Jump to content

Tidyverse - Wrong object type 'symbol' in call to CDR()


Bobby Neelon 2

Recommended Posts

I have a script that was working fine but now is not. I believe it to be something with a newer version of Tidyverse and the use of magrittr pipes (%>%).

I'm running Spotfire 10.10.1 and TERR version 5.1.0

Here is the part of my script throwing the error:

dist_df %

arrange(BH_Longitude) %>% # Sort West to East

mutate(lagBHLong = lag(BH_Longitude, n=1)) %>%

mutate(lagBHLat = lag(BH_Latitude, n=1)) %>%

mutate(BLOCKNUM = parse_number(str_trim(str_extract_all(Location,"(

Link to comment
Share on other sites

This issue is due to a recent change in the user-contributed "dplyr" and "magrittr" CRAN packages that broke their compatibility with TERR 5.1.0.

Spotfire Analyst 10.10.0, 10.10.1 and10.10.2useTERR 5.1.0 as theirbuilt-in local TERR engine. (But Spotfire Analyst 10.10.3 LTS uses TERR 6.0.0, which does not have this problem.)

For this issue, the workaround is to install earlier versions of "dplyr" and "magrittr" (and all of the other CRAN packages they depend on) from a historical snapshot of the open-source R community's CRAN repository.

.

The following command will install a historical snapshot of the "tidyverse" family of highly interdependent CRAN packages (including "dplyr" and "magrittr"), using versions that have not yet broken their compatibility with TERR 5.1.0:

##-----

install.packages("tidyverse", repos = "https://cran.microsoft.com/snapshot/2020-05-11")

##-----

That snapshot (2020-05-11) is from about a week before the TERR 5.1.0 release was built (2020-05-20), which is why I chose it.

.

In my test for Spotfire Analyst 10.10.2, I closed all Spotfire desktop client sessions, TERR Console sessions, and RStudio/TERR sessions on the machine, then opened a brand new TERR 5.1.0 Console session and used it to remove all of my installed CRAN packages, before I ran the call to install.packages() shown above.

.

For the Spotfire desktop client, use the following steps:

(1) Close all Spotfire desktop client sessions, TERR Console sessions, and RStudio/TERR sessions on the machine.

(2) Open a new Spotfire Analyst 10.10.0, 10.10.1 or10.10.2 desktop client session.

(3) Select "Tools > TERR Tools > Launch TERR Console" from the main menu.

(4) In that new TERR 5.1.0 Console session, paste all of the following (case sensitive) commands, then press the key:

##-----

remove.packages(.packages(all = TRUE, lib = .libPaths()[1]))

install.packages("tidyverse", repos = "https://cran.microsoft.com/snapshot/2020-05-11")

##-----

That will install all of the more than 90 packages in the "tidyverse" family, including "dplyr" and "magrittr", with the versions from that historical snapshot of the CRAN repository.

--

============

Important note on use of CRAN packages:

User-contributed R packages from the open-source R community's CRAN repository (https://cran.r-project.org/) are available under separate open source software license terms and are not part of the TIBCO Spotfire product line. As such, user-contributed CRAN packages are not within the scope of your license for any TIBCO Spotfire product. User-contributed CRAN packages are not supported, maintained, or warranted in any way by TIBCO Software Inc. Download and use of CRAN packages is solely at your own discretion and subject to the free open source license terms applicable to each individual package.

============

Link to comment
Share on other sites

Note also that upgrading to Spotfire Server 10.10.4 / Spotfire Analyst 10.10.3 HF-015 / TERR Service 1.3.1 / TIBCO Spotfire Statistics Services 10.10.2 will upgrade all of their TERR engines from TERR 5.1.0 to TERR 6.0.0.

In TERR 6.0.0, a simple call to install.packages("tidyverse") will install a suite of tidyverse package versions that do not have this problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...