Errors in running code in vignettes:
when running code in ‘data_in_mvgam.Rmd’
  ...

Number of Fisher Scoring iterations: 6


> summary(gam(y ~ series + s(time, by = series), data = simdat$data_train, 
+     family = poisson()))

  When sourcing ‘data_in_mvgam.R’:
Error: could not find function "gam"
Execution halted
when running code in ‘forecast_evaluation.Rmd’
  ...
make would use
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/Rcpp/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/unsupported"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/BH/include" -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/src/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -D_HAS_AUTO_PTR_ETC=0  -include '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/stan/math/prim/fun/Eigen.hpp'  -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c file2c571f24982b.cpp -o file2c571f24982b.o
if test  "zfile2c571f24982b.o" != "z"; then \
	  echo clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file2c571f24982b.so file2c571f24982b.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	  clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file2c571f24982b.so file2c571f24982b.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	fi

  When sourcing ‘forecast_evaluation.R’:
Error: invalid connection
Execution halted
when running code in ‘mvgam_overview.Rmd’
  ...
make would use
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/Rcpp/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/unsupported"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/BH/include" -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/src/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -D_HAS_AUTO_PTR_ETC=0  -include '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/stan/math/prim/fun/Eigen.hpp'  -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c filea85067b5ea0d.cpp -o filea85067b5ea0d.o
if test  "zfilea85067b5ea0d.o" != "z"; then \
	  echo clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o filea85067b5ea0d.so filea85067b5ea0d.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	  clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o filea85067b5ea0d.so filea85067b5ea0d.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	fi

  When sourcing ‘mvgam_overview.R’:
Error: invalid connection
Execution halted
when running code in ‘nmixtures.Rmd’
  ...
make would use
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/Rcpp/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/unsupported"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/BH/include" -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/src/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -D_HAS_AUTO_PTR_ETC=0  -include '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/stan/math/prim/fun/Eigen.hpp'  -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c file136b11195d0a2.cpp -o file136b11195d0a2.o
if test  "zfile136b11195d0a2.o" != "z"; then \
	  echo clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file136b11195d0a2.so file136b11195d0a2.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	  clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file136b11195d0a2.so file136b11195d0a2.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	fi

  When sourcing ‘nmixtures.R’:
Error: invalid connection
Execution halted
when running code in ‘shared_states.Rmd’
  ...
make would use
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/Rcpp/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/unsupported"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/BH/include" -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/src/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -D_HAS_AUTO_PTR_ETC=0  -include '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/stan/math/prim/fun/Eigen.hpp'  -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c file6ed315167828.cpp -o file6ed315167828.o
if test  "zfile6ed315167828.o" != "z"; then \
	  echo clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file6ed315167828.so file6ed315167828.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	  clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file6ed315167828.so file6ed315167828.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	fi

  When sourcing ‘shared_states.R’:
Error: invalid connection
Execution halted
when running code in ‘time_varying_effects.Rmd’
  ...
make would use
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/Rcpp/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/unsupported"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/BH/include" -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/src/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -D_HAS_AUTO_PTR_ETC=0  -include '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/stan/math/prim/fun/Eigen.hpp'  -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c file1588d5d4fd7ba.cpp -o file1588d5d4fd7ba.o
if test  "zfile1588d5d4fd7ba.o" != "z"; then \
	  echo clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file1588d5d4fd7ba.so file1588d5d4fd7ba.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	  clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file1588d5d4fd7ba.so file1588d5d4fd7ba.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	fi

  When sourcing ‘time_varying_effects.R’:
Error: invalid connection
Execution halted
when running code in ‘trend_formulas.Rmd’
  ...
make would use
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/Rcpp/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppEigen/include/unsupported"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/BH/include" -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/src/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/include/"  -I"/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -D_HAS_AUTO_PTR_ETC=0  -include '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/include/stan/math/prim/fun/Eigen.hpp'  -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c file2f934876ff21.cpp -o file2f934876ff21.o
if test  "zfile2f934876ff21.o" != "z"; then \
	  echo clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file2f934876ff21.so file2f934876ff21.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	  clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/x86_64/lib -o file2f934876ff21.so file2f934876ff21.o  '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.3/RcppParallel/lib -ltbb -ltbbmalloc  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
	fi

  When sourcing ‘trend_formulas.R’:
Error: invalid connection
Execution halted

  ‘data_in_mvgam.Rmd’ using ‘UTF-8’... failed
  ‘forecast_evaluation.Rmd’ using ‘UTF-8’... failed
  ‘mvgam_overview.Rmd’ using ‘UTF-8’... failed
  ‘nmixtures.Rmd’ using ‘UTF-8’... failed
  ‘shared_states.Rmd’ using ‘UTF-8’... failed
  ‘time_varying_effects.Rmd’ using ‘UTF-8’... failed
  ‘trend_formulas.Rmd’ using ‘UTF-8’... failed