#---------------------------------------------------------------#
install.packages("matrixcalc")  # para manipular matrices
library(matrixcalc)             # lanzanos el paquete

version                         # versión de R

#---------------------------------------------------------------#
## código ficticio                                                ##

install.packages("un_paquete")
library(un_paquete)

require(un_paquete)

if(require("un_paquete")==FALSE) 
  install.packages("un_paquete", 
                   dependencies=c("Depends", "Suggests"))
library(un_paquete)

#---------------------------------------------------------------#
## paquetes de sistema que se debe instalar                                 #

install.packages("rJava", 
                 dependencies=c("Depends", "Suggests"))
library('rJava')

install.packages("downloader", 
                 dependencies=c("Depends", "Suggests"))
library(downloader)


install.packages("devtools", 
                 dependencies=c("Depends", "Suggests"))

#---------------------------------------------------------------#
## código ficticio                                                ## 

devtools::install_github('un_paquete')

