You might want to install RStudio alongside R and try to install from there instead of from knime. Make sure you have the right path configured in knime.
https://docs.knime.com/latest/r_installation_guide/index.html#_introduction
You also could check your R version and packages
The. The question is which operating system you have.