# installing R packages from CRAN/Bioconductor/Omegahat/Github

#--------------------------------------------------------------------------------------------

# CRAN (http://cran.r-project.org/)
install.packages("timsac")

# Offline (already Downloaded pacakge - RSPython_0.7-1.tar.gz)
#choose any library destination
.libPaths()
install.packages("/home/trendwise/Downloads/R packages/RSPython_0.7-1.tar.gz",repos=NULL,lib=.libPaths()[1])

# Command line (already Downloaded pacakge - RSPython_0.7-1.tar.gz)
R CMD INSTALL RSPython_0.7-1.tar.gz

#--------------------------------------------------------------------------------------------

# Bioconductor (http://www.bioconductor.org/)
source("http://bioconductor.org/biocLite.R") # installs 'BiocInstaller'
biocLite() # installs automatically 'Biobase' 'IRanges' 'AnnotationDbi' ‘BiocGenerics’ ‘RSQLite’
s=all_group() # Get list of all packages in BioConductor
s
#installing GenomicFeatures &AnnotationDbi packages
biocLite(c("GenomicFeatures", "AnnotationDbi"))

#--------------------------------------------------------------------------------------------

# Omegahat (http://www.omegahat.org/) 
install.packages("RCurl", repos = "http://www.omegahat.org/R")
# For some packages, there are binaries for Windows. For most others, 
# you will need to specify to download the source package:
install.packages(packageName, repos = "http://www.omegahat.org/R", type = "source")

#--------------------------------------------------------------------------------------------

# Git-Hub (https://github.com/)
# packages name:- rplos
# repository name:- rOpenSci
install.packages("devtools") # requires for downloading & installation of GitHub packages
require(devtools)
install_github("rplos", "rOpenSci") # installing rOpenSci pkg
require(rplos)

# or download github files,build & install
git clone https://github.com/yihui/knitr.git
R CMD build knitr
R CMD INSTALL knitr_*.tar.gz

#--------------------------------------------------------------------------------------------

#RForge
 install.packages("audio",repos="http://rforge.net")
 install.packages('knitr', repos = c('http://rforge.net', 'http://cran.rstudio.org'),type = 'source')

#--------------------------------------------------------------------------------------------

# update all existing packages first
update.packages(ask = FALSE, repos = 'http://cran.rstudio.org')