R Code no longer works in 4.2

Hi!
I’m having trouble figuring out why my R Script (Table to R) is no longer running. It worked fine in 4.1.2, but will not run in 4.2. The script uses the packages “changepoint” and “dplyr”.
Here is the error:

Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

as.Date, as.Date.numeric

Successfully loaded changepoint package version 2.2.2
NOTE: Predefined penalty values changed in version 2.2. Previous penalty values with a postfix 1 i.e. SIC1 are now without i.e. SIC and previous penalties without a postfix i.e. SIC are now with a postfix 0 i.e. SIC0. See NEWS and help files for further details.
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(j ← i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘pillar’
Error: there is no package called ‘pillar’

I’ve reinstalled both packages, I’ve reinstalled RCPP, I’ve tried base::as.Date, nothing seems to be working yet. Prior to updating to KNIME 4.2 I hadn’t made ANY changes to my R installation or code.

Thanks for your help!

So, seems as though dplyr isn’t getting loaded for some reason.

sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] changepoint_2.2.2 zoo_1.8-0

loaded via a namespace (and not attached):
Error: subscript out of bounds

When I just evaluate the selection for dplyr:

library(dplyr)
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(j ← i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘pillar’

I can install pillar, but it never seems to help.

install.packages(“pillar”)

There are binary versions available but the source versions are later:
binary source needs_compilation
ellipsis 0.1.0 0.3.1 TRUE
rlang 0.3.4 0.4.7 TRUE
vctrs 0.1.0 0.3.2 TRUE
pillar 1.3.1 1.4.6 FALSE

Binaries will be installed
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\80198655\AppData\Local\Temp\knime-r-tmp87579\Rtmp4YF9Al\downloaded_packages
also installing the dependencies ‘ellipsis’, ‘lifecycle’, ‘rlang’, ‘vctrs’

trying URL ‘https://cran.case.edu/bin/windows/contrib/3.4/ellipsis_0.1.0.zip
Content type ‘application/zip’ length 30847 bytes (30 KB)
downloaded 30 KB

trying URL ‘https://cran.case.edu/bin/windows/contrib/3.4/rlang_0.3.4.zip
Content type ‘application/zip’ length 1080437 bytes (1.0 MB)
downloaded 1.0 MB

trying URL ‘https://cran.case.edu/bin/windows/contrib/3.4/vctrs_0.1.0.zip
Content type ‘application/zip’ length 499748 bytes (488 KB)
downloaded 488 KB

Warning: cannot remove prior installation of package ‘rlang’
installing the source packages ‘lifecycle’, ‘pillar’

trying URL ‘https://cran.case.edu/src/contrib/lifecycle_0.2.0.tar.gz
Content type ‘application/x-gzip’ length 164455 bytes (160 KB)
downloaded 160 KB

trying URL ‘https://cran.case.edu/src/contrib/pillar_1.4.6.tar.gz
Content type ‘application/x-gzip’ length 113884 bytes (111 KB)
downloaded 111 KB

The downloaded source packages are in
‘C:\Users\80198655\AppData\Local\Temp\knime-r-tmp87579\Rtmp4YF9Al\downloaded_packages’

library(pillar)
Error: there is no package called ‘pillar’

Still trying to find a solution… Would prefer not to rollback versions.

Have you thought about upgrading to R version 4.02? You could install that in a parallel folder and tell KNIME to use that version.

To compile some R packages you would also need RTools.

I haven’t done that yet.
As of now, I rolled back to 4.1.3, reinstalled RServe, pointed my path to R home to my local directory, and everything seems to be working again.
The only warning I get is:

WARN Table to R 0:401 R Version 3.5.0 and Rserve <= 1.8-6 currently have issues preventing their full use in KNIME. A future release of R and/or Rserve may fix these issues.

IDK if this has been fixed yet in R 4.02, but with a test script I wrote, I didn’t notice any issues.

Once my workflow finishes running, I’ll likely upgrade to 4.2 again, take your suggestion of R version 4.02, and see what happens.

It is very likely that you will have to install a current version of RServe (1.8.6) which might involve some additional steps.

https://docs.knime.com/2019-12/r_installation_guide/index.html#macos_script

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.