README.md

testRscalaPackage

Test to see if an RScala package will load properly

Useful links

R Package Skeleton Generation:

First, install the required packages by:

install.packages("devtools")
library(devtools)
install_github("hadley/devtools") # a newer version

To generate the directory structure of your package, execute in R

devtools::create("myfirstpackage")

Add the line

Imports: rscala

to DEPENDENCIES.

Make sure to provide a title in each of the R files in the R directory. You do this by adding the comments in the first line of the function as follow:

hello <- function(x) {
  #' hello
  #' @export
  print(paste("hello",x))
}

Also, export the function with the macro #' @export.

Then, to generate documentation by running the bash script gen.R by doing this in a terminal:

./gen.R

The file contains only the line roxygen2::roxygenise()

Publish -> install -> load library

# install.packages("devtools")
devtools::install_github("luiarthur/testRscalaPackage")
library(testRscalaPackage)

You are ready to use your library

hello("Arthur")


luiarthur/testRscalaPackage documentation built on May 21, 2019, 8:56 a.m.