DesktopDeployR icon indicating copy to clipboard operation
DesktopDeployR copied to clipboard

Use of custom packages

Open rhs94 opened this issue 1 year ago • 3 comments

Hi I did not understooth where I should run this and how: $ Rscript -e "devtools::install('path/to/package', lib = '/app/library')"

Is it in the command prompt, in the package.txt file, in the R script for the ui and server? And what do I need to write instrad of 'path/to/package'? Which path should it be?

I really hope someone can help! Thanks in advance!

rhs94 avatar Jun 22 '24 08:06 rhs94

I'm not a developer, but I have encountered this problem and you can do this by opening dist/R-Portable/App/R-Portable/bin/ R.exe and then installing your own custom package

SEvisual avatar Jun 27 '24 05:06 SEvisual

I believe this is what to do.

Open RStudio.

Type require(devtools) in the console (assuming you have already installed it)

Switch to /rstudio's Terminal tab.

My custom package is on github, so enter something like this. This is verbatim what I used that worked.

Rscript -e "devtools::install_github('ProfessorPeregrine/propagate',lib='C:\Users\smoue\Desktop\stat4ROI\app\library',force=TRUE)"

I had to add the force=TRUE to get it to install and I had to double-backslash to escape the path to the app directory.

This then installs your custom package into that directory.

ProfessorPeregrine avatar Jan 10 '25 23:01 ProfessorPeregrine

I put all the packages in the R Portable directory rather than having some in the app library and some in the R library. So modify the command above to something like:

Rscript -e "devtools::install_github('ProfessorPeregrine/propagate',lib='C:\Users\smoue\Desktop\stats4ROI\dist\R-Portable\App\R-Portable\library',force=TRUE)"

Make sure you also install all dependencies for your custom packages. It took me a while to figure that out. You can examine the log to see if you are missing dependencies.

ProfessorPeregrine avatar Jan 21 '25 18:01 ProfessorPeregrine