SJava (version 0.98.0)

mergePath: Merges classpath specifications

Description

Merges two character vectors of classpaths for use in creating arguments to initialize the Java Virtual Machine within R. This avoids duplicates.

Usage

mergePath(path, default, collapse=NULL)

Arguments

path
character vector of path elements
default
a character vector containing the default or previous classpath elements
collapse
a character vector used the value of a the collapse argument in a call to paste. If this is non-null, the resulting vector is converted to a single string. This is usually given as ":" on Unix machines and ";" on Windows machines.

Value

A character vector containing the union of the two arguments. If the collapse argument is specified, the elements of the resulting character vector are concatenated/pasted together to yield a single string.

References

http://www.omegahat.org/RSJava

See Also

.JavaInit javaConfig

Examples

Run this code
  mergePath("~/Java/MySQL/mm.mysql-2.0.1/mysql.jar",c("$OMEGA_HOME/Jars/antlr.jar","$OMEGA_HOME/Jars/jhall.jar"))
  mergePath("~/Java/MySQL/mm.mysql-2.0.1/mysql.jar",c("$OMEGA_HOME/Jars/antlr.jar","$OMEGA_HOME/Jars/jhall.jar"), collapse=":")

Run the code above in your browser using DataLab