How to install r package on server

Viewed 112

i am trying to install r package in ubuntu to deploy the app in shiny-server with required version i have tried the below code but it was throwing an error

Error: unexpected '/' in "install.packages(http:/"
Execution halted

Code:

sudo su - -c "R -e \"install.packages("http://cran.r-project.org/src/contrib/Archive/shinydashboard/shinydashboard_0.6.1.tar.gz", repos=NULL)\""

Is there any other way to install this packages in ubuntu

1 Answers

Try:

sudo su - \
-c "R -e \"install.packages('http://cran.r-project.org/src/contrib/Archive/shinydashboard/shinydashboard_0.6.1.tar.gz',
repos=NULL, type ='source')\""
Related