TIBCO® Enterprise Runtime for R

Changes in Functionality, Features, and Compatibility

From release to release, we might change the functionality. In cases where product changes require migration procedures, we provide information for that purpose. The following changes have been made to TERR version 6.0.

Changes in functionality and compatibility

Version 6.0 of TERR was tested with open-source R version 4.0.2. The following changes to functions in TERR were made for compatibility with open-source R 4.0.2 or with Java 11.

Key Description
TERR-3052 file.rename is now vectorized to allow renaming multiple files at once. For example,
file.rename(file.path(tdir, c("File1", "File2")), file.path(tdir, c("File1renamed", "File2renamed")))
TERR-7593 class(<matrix>) now returns c('matrix','array'), rather than 'array'. This change was made to match the behavior new to R 4.0. S3 dispatching for matrix objects now dispatch to both array and matrix methods. Also new in this release of TERR is the function .class2(x), which returns the class names used for S3 method dispatching of the object x.
TERR-7628 unlist(x,recursive=TRUE) now returns a factor when x is a multi-level list of factors (for example, a list of list of factors).  Previously, it returned a factor only when x was a 1-level list of factors.  This changes matches the behavior that open-source R has had for several releases.
TERR-7678 TERR now accepts raw string literals such as r'(abc)' to specify the string "abc". This change matches open-source R version 4.0, and it makes it easier to specify strings containing single and double quotes and backslashes.
TERR-7733 The plot() function was moved from the graphics package to the base package. (A copy is kept in the graphics package for backward compatibility.) This change was made so you can define plot methods without first loading the graphics package. TERR has implemented this change to match open-source R 4.0.
TERR-7744 The functions regexpr, gregexpr, and regexec functions now add the index.type and useBytes attributes to their output. This change is to match open-source R behavior.
TERR-7756 The default value of options("stringsAsFactors") and  of default.stringsAsFactors() is now FALSE instead of TRUE. This change affects how data.frame(), read.table(), and other functions that create data.frames treat character columns. This change follows the same change in R-4.0.0.
TERR-7764 TERR now treats Unicode characters according to the Unicode 8.0 standard, as opposed to the Unicode 6.0 standard used by TERR 5.1.
TERR-7770 The C code function Rf_defineVar(sym,R_UnboundValue,env) now gives an error, rather than removing the variable from env. This change matches a change in R 4.0.0.
TERR-7778 The paste() function now includes the argument recycle0=FALSE, to match a change made to R 4.0.1.
TERR-7793 stopifnot( NOT_GOOD = 1 < 0) now prints the error message "NOT_GOOD" instead of "1 < 0 is not TRUE"stopifnot() also has a new argument, exprObject.  These changes make stopifnot match the behavior of that function in version in R-4.0.0.
TERR-7794 The prop.table and margin.table functions have new preferred names: proportions and marginSums.  Also, you can now use these functions, as well as the functions apply and sweep, to specify the margins by name instead of only by number. (The names must be in names(dimnames(x))).
TERR-7807 The recursive argument to tools::package_dependencies can now be a vector of column names that specify which columns of available.packages to use for recursive dependencies. Also, the which and recursive arguments can use the nicknames "strong", "most", or "all" for commonly-used sets of column names.
TERR-7809 Changes to Java 11 caused a failure accessing TIBCO Spotfire® Statistics Services from the parallel package running under TERR. Because of this issue, support for the parallel package accessing Spotfire® Statistics Services is removed.
TERR-7810 The factor method for the c function has been implemented following a recent change in open-source R. This method combines factor arguments into a new factor whose levels attribute is the union of the levels attributes of the arguments. If all arguments are ordered factors with identical levels, then it returns an ordered factor with those levels.
Important: This change can break old code that used the c function on factors. Previously, c would strip the class and levels attributes and just combine the integer codes of the factors.
TERR-7824 The command-line arguments -s and --no-echo have replaced the deprecated --slave argument. This matches the behavior of open-source R 4.0.0.
TERR-7831 as.list(emptyenv(), sorted=TRUE) no longer gives an error in order(names(retval)). as.list(emptyenv(), sorted=TRUE) now returns a nameless empty list, as it always has when sorted is FALSE.
TERR-7834 If a package declares that it requires one C++ standard in both DESCRIPTION:SystemRequirements and src/Makevars, then the package requirement from src/Makevars is used. Previously, the one in DESCRIPTION was used, which caused problems with some packages with mismatched entries.
TERR-7836 install.packages() now runs the configure and clean steps with TERR_LIBS set to current value of .libPaths(). If the configuration script invokes TERR, then TERR can access all of the same packages that the main process can access. With this change, you can now install recent versions of packages such as prophet and other rstan-dependent packages from source.
TERR-7844 TERR CMD Rscript now processes its command line arguments the same way that open-source R does. In particular, TERR CMD Rscript -e "commandArgs(TRUE)" foo, now prints "foo" instead of treating "foo" as an R-code file to execute.

On the TERR command line, you can no longer supply both the -f file and -e expression arguments. You must choose to execute either a file or one or more in-line expressions.

TERR-7845 Factors with duplicated levels are no longer allowed and now return an error instead of a warning. This change matches behavior in open-source R 4.0.2.
TERR-7848 grid::unit() and grid::grob() no longer produce unimplemented function warnings. They are not implemented, but they caused several warnings when TERR loaded packages that imported the ggplot2 package. All of the other "unimplemented function" warnings in the grid package have been changed to "unimplemented graphics function" warnings.
TERR-7850 The command line command TERR CMD SHILB code.cpp now assumes that code.cpp adheres to the C++11 standard. To override this new behavior, in the file Makevars, use CXX_STD=CXX??.
TERR-7853 sample.int(n, ...) can now accept n > .Machine$integer.max, with limitations. In the n > .Machine$integer.max case, the return value is a numeric (not an integer) or a vector (but all values are in 1, 2, ..., n). The limitations are that for such large n, one cannot also supply the prob argument, and the sampling is only done with replacement (the replace argument is silently ignored).
TERR-7858 utils::URLencode(URL,...) and utils:::URLdecode(URL) can now handle a vector of URLs, not just a single URL.
TERR-7859 head(x,n) and tail(x,n), when x is an object with dimensions, allow n to be a vector the length of dim(x), specifying how many slices of each dimension to return.
TERR-7865 Calling the function drop1() for glm models and with test="Chisq" could result in a mislabeled test statistic column. Now, it labels the test statistic column as open-source R 4.0 does, using "LRT" when scale=1, or when family is specified as either binomial or poisson and scale=0, and using "scaled dev." otherwise.
TERR-7866 Calling the function drop1 and specifying a poisson or binomial glm object, and with test="F", now warns that the test is for a quasipoisson or quasibinomial model. (A Chisq test would be more appropriate here.)
TERR-7872 packBits(x, type) now accepts type="double", which causes packBits to pack the low order bit of each 64 elements of x into a double-precision numeric value. This is the inverse of the new numToBits(x).
TERR-7877 If x is equal to the NULL object, then x[[1]] <- vector now always turns x into a list with one entry: list(vector). Previously, the result depended on the length of vector: if the length was one, then x became a copy of vector; otherwise, x became list(vector). In TERR 6.0, the result is independent of the length of vector. This behavior is more consistent and follows the same change in open-source R 4.0.0.
TERR-7889 The R C API function R_ReleaseObject(extPtr) no longer warns if extPtr had not been protected by a previous call to R_Preserver(extPtr). This change stops unwarranted warnings from code using the xml2 package.

Additionally, the value of the repos option now includes a URL for the MRAN repository. The default date used in the MRAN URL is based on the TERR build year, month, and day. The order of precedence for installation of packages is now TRAN, MRAN, and CRAN.

Other version updates

Version updates and version compatibility testing include the following.

  • OpenSSL updated to version 1.1.1g (Included with TERR).
  • Tested with JAVA version 11; however, any compatible version of Java can be used.
  • open-source R version 4.0.2.
  • RStudio Desktop and Server version 1.3.1093. For more information, see Configuring RStudio to use TIBCO® Enterprise Runtime for R in the TERR documentation.

TERR is no longer tested with Spark, KNIME, or Hadoop. See the TERR articles on the TIBCO Community site for more information about using these tools.

The following packages included with TERR require a bit-matching 32-bit or 64-bit version Java.

  • parallel
  • sjdbc
  • terrJava
Note: Additionally, if you want to use the rJava package, or any other CRAN package that requires access to JAVA_HOME, this information applies.

To use these packages, you must set the JAVA_HOME environment variable to a valid Java installation before you load the packages. You can set JAVA_HOME using TERR by calling the following in the console:

Sys.setenv(JAVA_HOME="path_to_your_JRE_installation")

To check if the environment variable is set, call the following in the console:

Sys.getenv("JAVA_HOME")
Note: As of TERR version 4.1, for Windows and Mac installations, if the JAVA_HOME environment variable is not set, TERR uses system info to identify and load the latest Java installed on the system.