Interact with github rscripts Project
The github rscripts project at https://github.com/harrelfe/rscripts contains R scripts that are primarily analysis templates for teaching with RStudio. This function allows the user to print an organized list of available scripts, to download a script and load it into an RStudio script editor window, to list scripts whose major category contains a given string (ignoring case), or to list all major and mino categories.
getRs(file=NULL, guser='harrelfe', grepo='rscripts', gdir='raw/master', dir=NULL, browse=c('local', 'browser'), cats=FALSE, put=c('rstudio', 'source'))
file |
a character string containing a script file name.
Omit |
guser |
GitHub user name, default is |
grepo |
Github repository name, default is |
gdir |
Github directory under which to find retrievable files |
dir |
directory under |
browse |
When showing the rscripts contents directory, the
default is to list in tabular form in the console. Specify
|
cats |
Leave at the default ( |
put |
Leave at the default ( |
a data frame or list, depending on arguments
Frank Harrell and Cole Beck
## Not run: getRs() # list available scripts scripts <- getRs() # likewise, but store in an object that can easily # be viewed on demand in RStudio getRs('introda.r') # download introda.r and put in script editor getRs(cats=TRUE) # list available major and minor categories categories <- getRs(cats=TRUE) # likewise but store results in a list for later viewing getRs(cats='reg') # list all scripts in a major category containing 'reg' getRs('importREDCap.r', put='source') # source() to define a function # source() a new version of the Hmisc package's cut2 function: getRs('cut2.s', grepo='Hmisc', dir='R', put='source') ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.