ronkeizer / PKPDsim

R library for simulation of PKPD models [DEPRECATED, see InsightRX/PKPDsim]
Other
21 stars 12 forks source link

Problem installing PKPDsim package in R #9

Closed srm54 closed 8 years ago

srm54 commented 9 years ago

Hi Ron,

I've been trying to install the PKPDsim package in R and have been having a lot of trouble. The command keeps failing and I'm not sure why:

library(devtools) install_github("ronkeizer/PKPDsim") Downloading github repo ronkeizer/PKPDsim@master Installing PKPDsim '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file \ --no-environ --no-save --no-restore CMD INSTALL \ '/private/var/folders/f0/p8nbk2m95qv7pz3v72cy3k8c0000gn/T/Rtmpxf3dSk/devtools26e66353d01/ronkeizer-PKPDsim-0cf0304' \ --library='/Library/Frameworks/R.framework/Versions/3.1/Resources/library' \ --install-tests

  • installing source package ‘PKPDsim’ ... * R * exec * inst * preparing package for lazy loading Warning: replacing previous import by ‘dplyr::select’ when loading ‘PKPDsim’ Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘inline’ ERROR: lazy loading failed for package ‘PKPDsim’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/PKPDsim’ Error: Command failed (1)

Thanks for your help. Sophia

ronkeizer commented 9 years ago

Hi Sophia, R seems to complain that the "inline" library is not available. Can you try and install that manually before you install PKPDsim? Ron

srm54 commented 9 years ago

Yes! Thank you! That did the trick.

mct941 commented 8 years ago

Hi Ron, I tried to install this package, but running into slight different issue. It seems to be looking for Rcpp, even though it is already loaded. Please see below.

-Max

library("Rcpp", lib.loc="c:/Rlibs") install_github("ronkeizer/PKPDsim") Downloading GitHub repo ronkeizer/PKPDsim@master from URL https://api.github.com/repos/ronkeizer/PKPDsim/zipball/master Installing PKPDsim "C:/PROGRA~1/R/R-32~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \ "C:/Users/mtsai/AppData/Local/Temp/RtmpEPGuMY/devtools1bcc58504204/ronkeizer-PKPDsim-3d163f1" \ --library="c:/Rlibs" --install-tests

ronkeizer commented 8 years ago

thanks for the issue report. I actually haven't tried installing on Windows, so hard to provide advice here. This week I'm at a conference so don't have access to Windows PC, but will try to reproduce this next week, and let you know what I find. A general advice for such errors is sometimes to upgrade to the latest version of R and to the latest version of all packages, not sure if that could help your problem?

dpastoor commented 8 years ago

@mct941 One other test you can try is install another github-based package from source to check that Rtools and compilation through Rcpp are behaving properly. My go-to is devtools::install_github("hadley/dplyr") as it is so heavily involved with Cpp. If that also doesn't install issue is more general and likely unrelated to PKPDsim directly.

That error seems to suggest you have an Rcpp version compiled on a different platform than you are currently using. Where did you get it from and what version is it?

Run the commands and show this output, it could help

library(Rcpp)
devtools::session_info()
nskoch commented 4 years ago

Hi Ron,

trying a basic example

pk1 <- new_ode_model("pk_1cmt_oral") and I have this error message:

Error in Rcpp::sourceCpp(code = sim_func, rebuild = TRUE, env = globalenv(), : Error 1 occurred building shared library.

If you have any idea of what's going wrong, I will appreciate. Best regards Nicolas

For information I type session_info()

[1] C:/Users/nicol/Documents/R/win-library/4.0 [2] C:/Program Files/R/R-4.0.1/library

V -- Loaded and on-disk version mismatch.