Key Word(s): R



In [ ]:
#---------Test Imports-------------
import numpy as np
import keras
import gensim
import nltk
keras.layers.Dense(20)
In [ ]:
#-------Download R packages---------
## these two lines for JupyterHub only
#import os
#os.environ['R_HOME'] = "/usr/share/anaconda3/lib/R"

import rpy2
from rpy2.robjects.packages import importr

r_utils = importr('utils')

package_list = ['aplpack',
    'cluster',
    'codetools',
    'dbscan',
    'factoextra',
    'gam',
    'ggplot2',
    'splines',
    'TeachingDemos'
]

for name in package_list:
    r_utils.install_packages(name)

import rpy2
from rpy2.robjects.packages import importr
r_utils = importr('utils')

package_list = ['aplpack',
    'cluster',
    'codetools',
    'dbscan',
    'factoextra',
    'gam',
    'ggplot2',
    'splines',
    'TeachingDemos'
]

for name in package_list:
    r_utils.install_packages(name)