Rstan_package_skeleton: problem with build

If your question relates to installation please provide the following information:

  • Operating System
    macOS High Sierra 10.13.5
  • RStan Version 2.17.3
  • Output of writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars")))
  • Output of devtools::session_info("rstan")
    See uploaded file.

I am trying to create a package following Stefan Siegert, Jonah Gabry, and Ben Goodrich’s Step by Step guide and using RStudio. My problem arises when I go to Build - Install and Restart: a fatal error and the message:

==> R CMD INSTALL --no-multiarch --with-keep.source test

  • installing to library ‘/Users/Jeremy1/Rlibs’
  • installing source package ‘test’ …
    ** libs
    installing to /Users/Jeremy1/Rlibs/test/libs
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    Error: package or namespace load failed for ‘test’ in .doLoadActions(where, attach):
    error in load action .A.1 for package test: is(module, “character”): object ‘m’ not found
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing ‘/Users/Jeremy1/Rlibs/test’

Exited with status 1.

Do you have any Stan programs under src/stan_files/?

Sorry. I should have said. This was just the bare bonespackage
created with no input from me apart from naimng the path ‘test’.

I think it will work once there is actually a Stan program to build.

Many thanks. I’ll give it a try.