Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to add R.exe to the PATH

Tags:

powershell

r

So I tried adding R to the path on windows 10 (that is supposedly easy).

System Properties -> Environment variables -> Edit -> new: copy and paste: "C:\Program Files\R\R-3.5.0\bin\x64"

Now the thing is, Powershell just refuses to start the R environment when I type in R. R.exe works apparently. Rgui works as well. Is R a reserved letter in powershell or something? It also seems to repeat the previous command sometimes but that doesn't really seem completely consistent either. (I put this entry on top of the list of the path and restarted the pc already)

like image 295
Felix B. Avatar asked Jan 29 '23 04:01

Felix B.


1 Answers

when entering get-alias r I got the following result, so yes "r" is already taken ...

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           r -> Invoke-History

PS: you could remove that alias with remove-item alias:\r from your current powershell session and test if "r" then starts "R.exe". if that works for you, you could edit your profile to remove the alias "r -> Invoke-History" from every new session.

like image 65
Guenther Schmitz Avatar answered Feb 05 '23 14:02

Guenther Schmitz