my solution is to modify windows environment variables
control panel/system/advanced system settings
-
add an environment variable for R_USER
1.1 variable name: R_USER
1.2 click "Browse Directory" and select the path where the application is installed, then click "OK".
for example: C:\Program Files\R\R-4.2.1 -
modify the Path
click "Browse Directory" and select the path where the application is installed, then click "OK".
for example: C:\Program Files\R\R-4.2.1