Travis build statusCoverage statusAppVeyor build status

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

forge

forge provides a set of helper functions for input checking and casting. It is intended to be used by package developers to interoperate with other language runtimes, such as Python and JVM languages.

Installation

You can install forge from CRAN with

install.packages("forge")

You can install the development version from GitHub with

devtools::install_github("rstudio/forge")

Examples

library(sparklyr)
sc <- spark_connect(master = "local")

spark_vector <- function(sc, x) {
  v <- forge::cast_double_list(x)
  invoke_new(sc, "org.apache.spark.ml.linalg.DenseVector", v)
}

spark_vector(sc, 1:3)

Please note that the 'forge' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



kevinykuo/forge documentation built on May 25, 2019, 2:52 a.m.