And I want to separate data from this column into many sub-column (value is separated by ‘;’). After that, I melt table. I am already done with R code.
However, when I run on Knime with conda environment, the problem is:
@cuongnguyen it is possible to use R with the Conda Environment Propagation if you have Python/conda ready configured on your machine. You also will have to install additional packages like ‘tidyr’ or ‘pillar’ if they are not there.
I can’t help with the R part, but when you have the table already processed with R you can split by delimiter into a collection column and then ungroup? Or maybe unpivoting is the equivalent to melt.
br
@cuongnguyen maybe you try again with some more basic settings and a newer R version (4.1.3) which is available via conda(-forge). Your environment propagation has a lot of special linux packages that I cannot install on Windows/MacOS - so I set up a more generic YAML file - you could add other packages and update the environment later.
# conda env create -f py39_knime_r.yml
# conda env update -f py39_knime_r.yml --prune
# https://forum.knime.com/t/python-environment-creation-problem/41577/7?u=mlauber71
# https://docs.knime.com/latest/r_installation_guide/index.html
#
# To activate this environment, use
#
# $ conda activate py39_knime_r
#
# To deactivate an active environment, use
#
# $ conda deactivate
name: py39_knime_r # Name of the created environment
channels: # Repositories to search for packages
- conda-forge
dependencies: # List of packages that should be installed
- python=3.9 # Python
- py4j # used for KNIME <-> Python communication
- nomkl # Prevents the use of Intel's MKL
- pandas # Table data structures
- jedi<=0.17.2 # Python script autocompletion
- python-dateutil # Date and Time utilities
- numpy # N-dimensional arrays
- cairo # SVG support
- pillow # Image inputs/outputs
- matplotlib # Plotting
- pyarrow=6.0 # Arrow serialization
- IPython # Notebook support
- nbformat # Notebook support
- scipy # Notebook support
- python-flatbuffers<2.0 # because tensorflow expects a version before 2
- h5py<3.0 # must be < 3.0 because they changed whether str or byte is returned
- protobuf>3.12 # Lower protobuf versions do not work with TensorFlow 2
- libiconv # MDF Reader node
- asammdf=5.19.14 # MDF Reader node
# --------------- basic R packages -------------------------------------
- r-base>=4.1.3
- r-rserve>=1.8_7 # RServe to communicate between R and KNIME
- r-essentials
- r-cairo
- r-ggplot2
- r-sessioninfo
- r-foreign
- r-readr
- r-readxl
- pip
- pip:
- JPype1 # Databases