gs rao
gs rao

Reputation: 19

How to list out all installed R packages in Suse Linux 11 s3

We have installed R 3.1.1 in my current hadoop HDP 2.1.5 and I want to add more additional R packages, I want to what are all packages are currently installed?

Upvotes: 1

Views: 7684

Answers (2)

user5249203
user5249203

Reputation: 4648

I am not sure what the spldf pkg is, I hope it is a typo for sqldf

# to install all packages and its dependencies simple use the below code.  
install.packages("Package_Name", dependencies= True). 

Looks Like you are working with R-Hadoop. Sometimes the packages are not available on CRAN, you can download them and install them on your local computer and pass the path.

install.packages("path_to_installed_package.tar.gz", repos=NULL, type="source")

The following link may be helpful. Run an R job on Hadoop http://www.rdatamining.com/big-data/r-hadoop-setup-guide

Some useful packages for download https://github.com/RevolutionAnalytics/RHadoop/wiki

Upvotes: 0

Sowmya S. Manian
Sowmya S. Manian

Reputation: 3843

    # For checking the packages installed, use          
    > installed.packages() 
    > In_P <- installed.packages()[,1]

    # For checking all the available packages, use
    > available.packages()
    > Av_P <- available.packages()[,1]

    # Removing Installed packages from available packages list
    > Un_P <- Av_P[!Av_P %in% In_P]  

    # For installing Packages which are not installed already
    > install.packages(Un_P)

Upvotes: 1

Related Questions