Running R Code from Command Line (Windows)

Hello everybody,

I have a Rserver connected to the company datasbase and I develope my code on Rserver. I have two questions about it:

1-Can I execute a Rscript (located on Rserver) from windows console?
2-Can a user without R installed execute a Rscript located on Rserver from windows console?

thanks in advance!

Robert

I think we would probably need some clarification before we could make many recommendations.

What do you mean by "Rserver?" Do you mean you have R Studio Server?

Do you mean you want to execute a command line script on your local Windows computer and have it executed on the server hosting your R Studio Server?

Thanks nutterb and sorry for my explanation.

1- Rserver= R Studio Server.

2- No, I want to exectue from "cmd" windows console a R script located on my R Studio server.
This post (http://datacornering.com/how-to-run-r-scripts-from-the-windows-command-line-cmd/) explain how to do that with local R sutdio, but i would like to do with R studio server scripts.

Also I don't understant what is the R.exe needed in the post and I don't know how to created it.

Thanks and sorry for my english.

I think you are a little bit confused, that post explains how to run commands in R, not in RStudio, they are closely related but not the same, R is the programming language and RStudio is an IDE (Integrated Development Environment) for the R language.
And, if I understand you correctly, you want to execute commands on an R session in your server from a cmd terminal in your Windows machine, for that you need to make an ssh connection to the server and open an R session, since Windows now have a native ssh client, it is possible to do it from a cmd terminal.

But if you already have RStudio server installed in your server it would be much easier to just open a session in your Windows machine and simply execute your script.

Hi ,

I have a Rstudio server. The idea is that a user that don't have R installed could run a script in rstudio serverfrom his local computer. Is important that the user can't manage the script, just run and get the output in a specific folder.

For example, I have a "test.R" in a Rstudio server folder. Can a user open de cmd windows and run the script without see R software or R script?

Thank you!

There is no such thing as RStudio server folder, it is just a regular folder in your server and as I said you can run R scripts on the server from another computer if you make an ssh connection.