Icon

kn_​forum_​37416_​curve_​fit_​r

List type loosing type information with genuine KNIME to R node

Example workflow showing:

1. Loss of collection cell types on pass through R snippet

2. Deconvoluting a List cell in R snippet and outputing a new List of Doubles - which loses it's type information

Example workflow showing:1. Loss of collection cell types on pass through R snippet2. Deconvoluting a List cell in R snippet and outputing a new List of Doubles - which loses it's type information saving the list as parquet ssems to 'save' thetype information (on a Mac at least ...) ## Just pass the incoming table straight throughlibrary(arrow)library(foreign)# export file as parquetvar_loc_parquet <- paste0(knime.flow.in[["var_path_data"]], "test_file.parquet")write_parquet(knime.in, var_loc_parquet, compression = "gzip")knime.out <- knime.in dummy dataNode 2v_path_arff_file Fit to each rowto y = mx + c(1 per row)Node 343Correct predicted ylist typepass straightthroughx and y are now generic 'DataValue'v_path_parquet_filetest_file.parquetv_path*x and y are now DoubleTable Creator GroupBy collect meta data Java EditVariable (simple) R Snippet Joiner (deprecated) Java Snippet R Snippet Ungroup Table DifferenceFinder Java EditVariable (simple) Parquet Reader String to Path(Variable) Ungroup Table DifferenceFinder Example workflow showing:1. Loss of collection cell types on pass through R snippet2. Deconvoluting a List cell in R snippet and outputing a new List of Doubles - which loses it's type information saving the list as parquet ssems to 'save' thetype information (on a Mac at least ...) ## Just pass the incoming table straight throughlibrary(arrow)library(foreign)# export file as parquetvar_loc_parquet <- paste0(knime.flow.in[["var_path_data"]], "test_file.parquet")write_parquet(knime.in, var_loc_parquet, compression = "gzip")knime.out <- knime.in dummy dataNode 2v_path_arff_file Fit to each rowto y = mx + c(1 per row)Node 343Correct predicted ylist typepass straightthroughx and y are now generic 'DataValue'v_path_parquet_filetest_file.parquetv_path*x and y are now DoubleTable Creator GroupBy collect meta data Java EditVariable (simple) R Snippet Joiner (deprecated) Java Snippet R Snippet Ungroup Table DifferenceFinder Java EditVariable (simple) Parquet Reader String to Path(Variable) Ungroup Table DifferenceFinder

Nodes

Extensions

Links