Icon

kn_​example_​r_​check_​version_​of_​package

check version of R packages in KNIME

demonstrates how to check the versions of every R package. And specifically check for the version of the RServe package.

With the help of the package sessioninfo you could extract more detailed infos about a specific package
https://www.rdocumentation.org/packages/sessioninfo

The subfolder /result/ would contain TXT files with information about the packages.

There is a new official guide to install R with KNIME
https://docs.knime.com/latest/r_installation_guide/index.html


**********************
**********************

if (!require("pacman")) install.packages("pacman")

pacman::p_load(Amelia, BBmisc, BH, Cairo, Cubist, DBI, DT, Deriv, DescTools, DiagrammeR, Exact, Formula, GGally, IDPmisc, IDmining, KernSmooth, MASS, Matrix, MatrixModels, ModelMetrics, PRROC, ParamHelpers, R.methodsS3, R.oo, R.utils, R6, RColorBrewer, RCurl, RH2, RJDBC, ROCR, ROSE, RPushbullet, RSQLite, RSclient, Rcpp, RcppArmadillo, RcppEigen, RcppParallel, Rserve, Rtsne, SQUAREM, SparseM, StanHeaders, TH.data, TSP, TTR, V8, XLConnect, XML, abind, antiword, ape, aplpack, arrow, arsenal, askpass, assertthat, backports, base, base64enc, bit, bit64, bitops, blob, boot, brew, brio, broom, bslib, caTools, cachem, callr, car, carData, caret, cellranger, checkmate, chron, class, cli, clipr, cluster, codetools, colorspace, colourpicker, commonmark, compiler, conquer, corrgram, cpp11, crayon, credentials, crosstalk, curl, data.table, data.tree, datasets, dbplyr, desc, devtools, diffobj, digest, doParallel, docxtractr, downloader, dplyr, drc, dtplyr, dygraphs, e1071, ellipse, ellipsis, evaluate, expm, extraDistr, fBasics, fansi, farver, fastmap, fastmatch, fontawesome, forcats, foreach, foreign, fs, future, future.apply, gains, gargle, gbm, generics, gert, ggExtra, ggplot2, gh, gitcreds, gld, globals, glue, googledrive, googlesheets4, gower, gplots, grDevices, graphics, grid, gridExtra, gss, gtable, gtools, h2o, hardhat, haven, hexbin, highr, hms, htmltools, htmlwidgets, httpuv, httr, ids, igraph, influenceR, ini, inline, installr, ipred, isoband, iterators, janitor, jquerylib, jsonlite, knitr, labeling, lars, later, lattice, lava, lazyeval, lifecycle, lift, listenv, lme4, lmom, loo, lubridate, magrittr, maptools, markdown, matrixStats, memoise, methods, mgcv, mime, miniUI, minpack.lm, minqa, mlr, mnormt, modelr, multcomp, munsell, mvtnorm, ndjson, neuralnet, nlme, nloptr, nnet, numDeriv, odbc, openssl, openxlsx, pROC, pacman, parallel, parallelMap, parallelly, pastecs, pbkrtest, pdftools, pillar, pkgbuild, pkgconfig, pkgload, plogr, plotrix, plyr, pmml, praise, prettyunits, processx, prodlim, progress, progressr, promises, prophet, proxy, ps, psych, purrr, qpdf, quantreg, rJava, randomForest, randomForestSRC, rappdirs, rcmdcheck, readODS, readr, readtext, readxl, recipes, rematch, rematch2, remotes, reprex, reshape, reshape2, rio, rjson, rlang, rmarkdown, rootSolve, roxygen2, rpart, rprojroot, rstan, rstantools, rstudioapi, rversions, rvest, sandwich, sass, scales, selectr, sessioninfo, shiny, shinyjs, snakecase, sourcetools, sp, spatial, splines, stabledist, stats, stats4, streamR, stringi, stringr, striprtf, survival, sys, tcltk, testthat, tibble, tidyr, tidyselect, tidyverse, timeDate, timeSeries, tinytex, tmvnsim, tools, tsne, tzdb, usethis, utf8, utils, uuid, vctrs, viridis, viridisLite, visNetwork, vroom, vtreat, waldo, whisker, withr, wrapr, xfun, xgboost, xlsx, xlsxjars, xml2, xopen, xtable, xts, yaml, zip, zoo)

demonstrates how to check the versions of every R package. And specifically check for the version of the RServe package.With the help of the package sessioninfo you could extract more detailed infos about a specific packagehttps://www.rdocumentation.org/packages/sessioninfoThe subfolder /result/ would contain TXT files with information about the packages.There is a new official guide to install R with KNIMEhttps://docs.knime.com/latest/r_installation_guide/index.html knime.out <- as.data.frame(installed.packages())knime.out <- as.data.frame(.libPaths()) # some quick codes to install and find Rtools on Windowsinstall.packages('installr')library("installr")install.Rtools() workpath_r <- "C:\\Users\\my_user\\temp" setwd(workpath_r) # Set work directory# https://community.rstudio.com/t/how-to-set-a-variable-in-renviron/5029/3usethis::edit_r_environ()# https://forum.knime.com/t/how-to-import-tables-from-docx-documents-via-r-snippet/19284/10?u=mlauber71devtools::find_rtools()# check if you can access the make statement of RToolsSys.which("make") # basic session infos and specific infos about a filev_path_file_1 <- paste0(knime.flow.in[["v_result_path"]], "sessionInfo_1.txt")writeLines(capture.output(sessionInfo()), v_path_file_1)library("sessioninfo")v_path_file_2 <- paste0(knime.flow.in[["v_result_path"]], "sessionInfo_2.txt")writeLines(capture.output(session_info()), v_path_file_2)v_package_to_check <- knime.flow.in[["v_search_package"]]v_path_file_3 <- paste0(knime.flow.in[["v_result_path"]], "sessionInfo_", v_package_to_check, ".txt")writeLines(capture.output(session_info(v_package_to_check)), v_path_file_3)knime.out <- as.data.frame(v_path_file_3) # to automatically update your R on windows start this script in your plain R GUI# https://www.r-statistics.com/2013/03/updating-r-from-r-on-windows-using-the-installr-package/if(!require(installr)) {install.packages("installr"); require(installr)} #load / install+load installr # using the package:updateR() if (!require("pacman")) install.packages("pacman")pacman::p_load(Amelia, BBmisc, BH, Cairo, Cubist, DBI, DT, Deriv,DescTools, DiagrammeR, Exact, Formula, GGally, IDPmisc, IDmining,KernSmooth, MASS, Matrix, MatrixModels, ModelMetrics, PRROC,ParamHelpers, R.methodsS3, R.oo, R.utils, R6, RColorBrewer, RCurl, RH2,RJDBC, ROCR, ROSE, RPushbullet, RSQLite, RSclient, Rcpp,RcppArmadillo, RcppEigen, RcppParallel, Rserve, Rtsne, SQUAREM,SparseM, StanHeaders, TH.data, TSP, TTR, V8, XLConnect, XML, abind,antiword, ape, aplpack, arrow, arsenal, askpass, assertthat, backports, base,base64enc, bit, bit64, bitops, blob, boot, brew, brio, broom, bslib, caTools,cachem, callr, car, carData, caret, cellranger, checkmate, chron, class, cli,clipr, cluster, codetools, colorspace, colourpicker, commonmark, compiler,conquer, corrgram, cpp11, crayon, credentials, crosstalk, curl, data.table,data.tree, datasets, dbplyr, desc, devtools, diffobj, digest, doParallel,docxtractr, downloader, dplyr, drc, dtplyr, dygraphs, e1071, ellipse, ellipsis,evaluate, expm, extraDistr, fBasics, fansi, farver, fastmap, fastmatch,fontawesome, forcats, foreach, foreign, fs, future, future.apply, gains, gargle,gbm, generics, gert, ggExtra, ggplot2, gh, gitcreds, gld, globals, glue,googledrive, googlesheets4, gower, gplots, grDevices, graphics, grid,gridExtra, gss, gtable, gtools, h2o, hardhat, haven, hexbin, highr, hms,htmltools, htmlwidgets, httpuv, httr, ids, igraph, influenceR, ini, inline, installr,ipred, isoband, iterators, janitor, jquerylib, jsonlite, knitr, labeling, lars, later,lattice, lava, lazyeval, lifecycle, lift, listenv, lme4, lmom, loo, lubridate, magrittr,maptools, markdown, matrixStats, memoise, methods, mgcv, mime, miniUI,minpack.lm, minqa, mlr, mnormt, modelr, multcomp, munsell, mvtnorm,ndjson, neuralnet, nlme, nloptr, nnet, numDeriv, odbc, openssl, openxlsx,pROC, pacman, parallel, parallelMap, parallelly, pastecs, pbkrtest, pdftools,pillar, pkgbuild, pkgconfig, pkgload, plogr, plotrix, plyr, pmml, praise,prettyunits, processx, prodlim, progress, progressr, promises, prophet, proxy,ps, psych, purrr, qpdf, quantreg, rJava, randomForest, randomForestSRC,rappdirs, rcmdcheck, readODS, readr, readtext, readxl, recipes, rematch,rematch2, remotes, reprex, reshape, reshape2, rio, rjson, rlang, rmarkdown,rootSolve, roxygen2, rpart, rprojroot, rstan, rstantools, rstudioapi, rversions,rvest, sandwich, sass, scales, selectr, sessioninfo, shiny, shinyjs, snakecase,sourcetools, sp, spatial, splines, stabledist, stats, stats4, streamR, stringi,stringr, striprtf, survival, sys, tcltk, testthat, tibble, tidyr, tidyselect, tidyverse,timeDate, timeSeries, tinytex, tmvnsim, tools, tsne, tzdb, usethis, utf8, utils,uuid, vctrs, viridis, viridisLite, visNetwork, vroom, vtreat, waldo, whisker, withr,wrapr, xfun, xgboost, xlsx, xlsxjars, xml2, xopen, xtable, xts, yaml, zip, zoo) knime.out <- as.data.frame(installed.packages())RServe versionneeds to be >=1.8.6knime.out <- as.data.frame(.libPaths())knime.out <- as.data.frame(v_path_file_3)v_result_pathinstall_r_packagesdeterminepath and name of workflowr_packages.xlsxinstall_r_packages_pacmaninstall_r_packages_pacmaninstall_r_packages_pacmaninstall_r_packages_pacman.Rv_search_package R Source (Table) Rule-basedRow Filter R Source (Table) R Source (Table) Java EditVariable (simple) String Manipulation Extract ContextProperties Excel Writer GroupBy String Manipulation Column Filter Table Creator CSV Writer Concatenate String Widget demonstrates how to check the versions of every R package. And specifically check for the version of the RServe package.With the help of the package sessioninfo you could extract more detailed infos about a specific packagehttps://www.rdocumentation.org/packages/sessioninfoThe subfolder /result/ would contain TXT files with information about the packages.There is a new official guide to install R with KNIMEhttps://docs.knime.com/latest/r_installation_guide/index.html knime.out <- as.data.frame(installed.packages())knime.out <- as.data.frame(.libPaths()) # some quick codes to install and find Rtools on Windowsinstall.packages('installr')library("installr")install.Rtools() workpath_r <- "C:\\Users\\my_user\\temp" setwd(workpath_r) # Set work directory# https://community.rstudio.com/t/how-to-set-a-variable-in-renviron/5029/3usethis::edit_r_environ()# https://forum.knime.com/t/how-to-import-tables-from-docx-documents-via-r-snippet/19284/10?u=mlauber71devtools::find_rtools()# check if you can access the make statement of RToolsSys.which("make") # basic session infos and specific infos about a filev_path_file_1 <- paste0(knime.flow.in[["v_result_path"]], "sessionInfo_1.txt")writeLines(capture.output(sessionInfo()), v_path_file_1)library("sessioninfo")v_path_file_2 <- paste0(knime.flow.in[["v_result_path"]], "sessionInfo_2.txt")writeLines(capture.output(session_info()), v_path_file_2)v_package_to_check <- knime.flow.in[["v_search_package"]]v_path_file_3 <- paste0(knime.flow.in[["v_result_path"]], "sessionInfo_", v_package_to_check, ".txt")writeLines(capture.output(session_info(v_package_to_check)), v_path_file_3)knime.out <- as.data.frame(v_path_file_3) # to automatically update your R on windows start this script in your plain R GUI# https://www.r-statistics.com/2013/03/updating-r-from-r-on-windows-using-the-installr-package/if(!require(installr)) {install.packages("installr"); require(installr)} #load / install+load installr # using the package:updateR() if (!require("pacman")) install.packages("pacman")pacman::p_load(Amelia, BBmisc, BH, Cairo, Cubist, DBI, DT, Deriv,DescTools, DiagrammeR, Exact, Formula, GGally, IDPmisc, IDmining,KernSmooth, MASS, Matrix, MatrixModels, ModelMetrics, PRROC,ParamHelpers, R.methodsS3, R.oo, R.utils, R6, RColorBrewer, RCurl, RH2,RJDBC, ROCR, ROSE, RPushbullet, RSQLite, RSclient, Rcpp,RcppArmadillo, RcppEigen, RcppParallel, Rserve, Rtsne, SQUAREM,SparseM, StanHeaders, TH.data, TSP, TTR, V8, XLConnect, XML, abind,antiword, ape, aplpack, arrow, arsenal, askpass, assertthat, backports, base,base64enc, bit, bit64, bitops, blob, boot, brew, brio, broom, bslib, caTools,cachem, callr, car, carData, caret, cellranger, checkmate, chron, class, cli,clipr, cluster, codetools, colorspace, colourpicker, commonmark, compiler,conquer, corrgram, cpp11, crayon, credentials, crosstalk, curl, data.table,data.tree, datasets, dbplyr, desc, devtools, diffobj, digest, doParallel,docxtractr, downloader, dplyr, drc, dtplyr, dygraphs, e1071, ellipse, ellipsis,evaluate, expm, extraDistr, fBasics, fansi, farver, fastmap, fastmatch,fontawesome, forcats, foreach, foreign, fs, future, future.apply, gains, gargle,gbm, generics, gert, ggExtra, ggplot2, gh, gitcreds, gld, globals, glue,googledrive, googlesheets4, gower, gplots, grDevices, graphics, grid,gridExtra, gss, gtable, gtools, h2o, hardhat, haven, hexbin, highr, hms,htmltools, htmlwidgets, httpuv, httr, ids, igraph, influenceR, ini, inline, installr,ipred, isoband, iterators, janitor, jquerylib, jsonlite, knitr, labeling, lars, later,lattice, lava, lazyeval, lifecycle, lift, listenv, lme4, lmom, loo, lubridate, magrittr,maptools, markdown, matrixStats, memoise, methods, mgcv, mime, miniUI,minpack.lm, minqa, mlr, mnormt, modelr, multcomp, munsell, mvtnorm,ndjson, neuralnet, nlme, nloptr, nnet, numDeriv, odbc, openssl, openxlsx,pROC, pacman, parallel, parallelMap, parallelly, pastecs, pbkrtest, pdftools,pillar, pkgbuild, pkgconfig, pkgload, plogr, plotrix, plyr, pmml, praise,prettyunits, processx, prodlim, progress, progressr, promises, prophet, proxy,ps, psych, purrr, qpdf, quantreg, rJava, randomForest, randomForestSRC,rappdirs, rcmdcheck, readODS, readr, readtext, readxl, recipes, rematch,rematch2, remotes, reprex, reshape, reshape2, rio, rjson, rlang, rmarkdown,rootSolve, roxygen2, rpart, rprojroot, rstan, rstantools, rstudioapi, rversions,rvest, sandwich, sass, scales, selectr, sessioninfo, shiny, shinyjs, snakecase,sourcetools, sp, spatial, splines, stabledist, stats, stats4, streamR, stringi,stringr, striprtf, survival, sys, tcltk, testthat, tibble, tidyr, tidyselect, tidyverse,timeDate, timeSeries, tinytex, tmvnsim, tools, tsne, tzdb, usethis, utf8, utils,uuid, vctrs, viridis, viridisLite, visNetwork, vroom, vtreat, waldo, whisker, withr,wrapr, xfun, xgboost, xlsx, xlsxjars, xml2, xopen, xtable, xts, yaml, zip, zoo) knime.out <- as.data.frame(installed.packages())RServe versionneeds to be >=1.8.6knime.out <- as.data.frame(.libPaths())knime.out <- as.data.frame(v_path_file_3)v_result_pathinstall_r_packagesdeterminepath and name of workflowr_packages.xlsxinstall_r_packages_pacmaninstall_r_packages_pacmaninstall_r_packages_pacmaninstall_r_packages_pacman.Rv_search_package R Source (Table) Rule-basedRow Filter R Source (Table) R Source (Table) Java EditVariable (simple) String Manipulation Extract ContextProperties Excel Writer GroupBy String Manipulation Column Filter Table Creator CSV Writer Concatenate String Widget

Nodes

Extensions

Links