Example of a TERR command to test whether a TERR instance can see the CRAN repository

Example of a TERR command to test whether a TERR instance can see the CRAN repository

book

Article ID: KB0081595

calendar_today

Updated On:

Products Versions
Spotfire Enterprise Runtime for R All supported versions

Description

This article provides an example of a TIBCO Enterprise Runtime for R (TERR) command that can be used to test whether a particular TERR instance can see the open-source R community's CRAN repository of user-contributed R packages.

Issue/Introduction

Example of a TERR command to test whether a TERR instance can see the CRAN repository

Resolution

The following TERR command can be issued in a TERR Console session or built into a Spotfire data function's TERR script, to test whether the TERR instance can see the open-source R community's CRAN repository for downloading and installing user-contributed R packages:

      "data.table" %in% rownames( available.packages() )

If this command returns either TRUE or FALSE, the TERR instance can see the CRAN repository.

The following is an example of its use in a TERR Console session:

==========
TIBCO Software Inc. Confidential Information
Copyright (C) 2011-2017 TIBCO Software Inc. ALL RIGHTS RESERVED
TIBCO Enterprise Runtime for R version 4.3.0 for Microsoft Windows 64-bit

Type 'help()' for help.
Type 'q()' to quit.
>
>
> "data.table" %in% rownames( available.packages() )
[1] TRUE
>
>
==========