testUtils: Utilities for facilitating data and method tests

Description Usage Arguments Value Author(s)

Description

These functions provide utilities that are useful when testing different aspects of R / Java communication.

Usage

1
2
3
checkJava2R(javaData, rVariable)
checkPkgVersion(pkgName, expVersion)
reflectObj(x, verbose=FALSE)

Arguments

javaData

Object translated from Java

rVariable

R variable containing an instance that is supposed to be identical to javaData. rVariable might have been created in previous calls, or loaded from a data file.

pkgName

Name of package whose version will be determined.

expVersion

Character string with expected package version.

x

Object to be returned to Java.

verbose

Logical, indicating whether R reports information about the object.

Value

checkJava2R returns TRUE if javaData is identical to rVariable, or signals an error otherwise.

checkPkgVersion returns true if the installed package matches the expected package, or signals a warning otherwise.

reflectObj returns the object.

Author(s)

Nianhua Li


RWebServices documentation built on Oct. 5, 2016, 4:53 a.m.