Giter Site home page Giter Site logo

Comments (11)

jgabry avatar jgabry commented on May 27, 2024 1

Thanks a lot for the initial report and the follow ups! I haven't had a chance to look thoroughly yet, but we're aiming for a release soon and will be sure to get this sorted out first.

from rstantools.

jgabry avatar jgabry commented on May 27, 2024 1

Yeah, I think this is fixed in PR #44, which is for the next major release of rstantools. If you want to try it out and report back that would be great!

from rstantools.

jgabry avatar jgabry commented on May 27, 2024 1

Sorry I should have clarified that you would need to install from a particular branch for the time being:

devtools::install_github("stan-dev/rstantools", ref = "mlysy-rstantools_patch")

from rstantools.

decision-sciences avatar decision-sciences commented on May 27, 2024 1

Thank you very much Jonah for helping me out. BTW for those who also want to convert the existing directory created by rstan_create_package() into a git repository, use usethis::use_git() then it will add necessary files there for you.

from rstantools.

stephensrmmartin avatar stephensrmmartin commented on May 27, 2024

Was able to work around this by modifying the rstan_package_skeleton function to include:
usethis::proj_set(DIR)
on line 49.

The next error occurs:

> suppressMessages(roxygen2::roxygenise(package.dir = DIR,
+                                       clean = TRUE))
Writing NAMESPACE
Error in getDLLRegisteredRoutines.DLLInfo(dll, addNames = FALSE) : 
  must specify DLL via a “DLLInfo” object. See getLoadedDLLs()

from rstantools.

stephensrmmartin avatar stephensrmmartin commented on May 27, 2024

That was worked around by building w/out documentation first, using pkgbuild::compile_dll(), then documenting after. I also realized after entirely too much time spent that stan models cannot have dashes in their file name. It's fine for stan_model(), but not for when creating a package with the model in stan_models/.

from rstantools.

ZhaoQii avatar ZhaoQii commented on May 27, 2024

Guys, any new progress on this error?

from rstantools.

decision-sciences avatar decision-sciences commented on May 27, 2024

Hi, thanks for sharing this. I reinstall the latest rstantools package from Github. But same error returned again as in the first post:

> library("rstantools", lib.loc="/Library/Frameworks/R.framework/Versions/3.6/Resources/library")
This is rstantools version 1.5.1.9000
> rstan_package_skeleton(path = 'test1')
Creating package skeleton for package: test1
Running usethis::create_package ...
Warning: `recursive` is deprecated, please use `recurse` instead
✔ Creating 'test1/'
✔ Setting active project to '/Users/ap/Documents/Columbia/RA CDS/DEEP/DEEP New Pages/test1'
Warning: `recursive` is deprecated, please use `recurse` instead
✔ Creating 'R/'
✔ Writing 'DESCRIPTION'
Package: test1
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R (parsed):
    * First Last <[email protected]> [aut, cre] (<https://orcid.org/YOUR-ORCID-ID>)
Description: What the package does (one paragraph).
License: What license it uses
Depends:
    methods,
    R (>= 3.4.0),
    Rcpp (>= 1.0.1)
Imports:
    rstan (>= 2.18.2),
    rstantools (>= 1.5.1)
LinkingTo:
    BH (>= 1.69.0-1),
    Rcpp (>= 1.0.1),
    RcppEigen (>= 0.3.3.5.0),
    rstan (>= 2.18.2),
    StanHeaders (>= 2.18.1)
Encoding: UTF-8
LazyData: true
NeedsCompilation: yes
SystemRequirements: GNU make
✔ Writing 'NAMESPACE'
✔ Writing 'test1.Rproj'
✔ Adding '.Rproj.user' to '.gitignore'
✔ Adding '^test1\\.Rproj$', '^\\.Rproj\\.user$' to '.Rbuildignore'
✔ Setting active project to '<no active project>'
Error: Path '/Users/ap/Documents/Columbia/RA CDS/DEEP/DEEP New Pages/' does not appear to be inside a project or package.

from rstantools.

decision-sciences avatar decision-sciences commented on May 27, 2024

Great, the new function rstan_create_package works now here! But it seems that the structure of package it constructed does not appear to be a git repository (indicated by Github Desktop Mac) so I can't publish it there.

from rstantools.

jgabry avatar jgabry commented on May 27, 2024

Right, it's not automatically a git repository but it can easily be made into a git repository in the same way as you would turn any existing directory into a git repository using the GitHub Desktop app or command line git. Another option is to use the extra functionality in the usethis package (the new rstan_create_package is basically a wrapper around usethis::create_package()). For example, the usethis::use_github() function that will create a github repo for your package after it's created by rstan_create_package(). Hope that helps!

from rstantools.

jgabry avatar jgabry commented on May 27, 2024

Closing since #44 has now been merged into master

from rstantools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.