Casting Values into Shape

Helper functions with a consistent interface to coerce and verify the types and shapes of values for input checking.

Travis buildstatusCoveragestatusAppVeyorbuildstatus

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.


You can install forge from CRAN with


You can install the development version from GitHub with



sc <- spark_connect(master = "local")
spark_vector <- function(sc, x) {
  v <- forge::cast_double_list(x)
  invoke_new(sc, "", v)
spark_vector(sc, 1:3)
#> <jobj[14]>
#>   [1.0,2.0,3.0]

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.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.0 by Kevin Kuo, 6 months ago

Browse source code at

Authors: Kevin Kuo [aut, cre]

Documentation:   PDF Manual  

Apache License (>= 2.0) license

Imports rlang

Suggests testthat, covr

Imported by graphframes, mlflow, sparklyr, tfestimators, tfio.

See at CRAN