Questions tagged [rscript]

Rscript (Rscript.exe on Windows) is a binary front-end to R, for use in scripting applications.

Rscript (Rscript.exe on Windows) is a binary front-end to R, for use in scripting applications. It is included in the core R distribution since version 2.5.0.

littler is an alternative front end to R for use in '#!' scripts.

Example:

Rscript

#! /path/to/Rscript
args <- commandArgs()
args <- args[-(1:match("--args", args)]
cat('hello world!', args, "\n")

littler

#! /path/to/r
cat('hello world!', argv, "\n")

Rscript passes all script arguments to R as additional elements to the vector returned from commandArgs().

littler provides convenience by assigning the script arguments to an argv vector and placing that into the global environment, a convention followed by other popular scripting languages.

656 questions
0
votes
1 answer

How to push your codes/file to github via Rscript?

I am able to push the files via command prompt with the same code, it worked fine, but when I do the same via Rscript I get many errors: My Rscript code: shell(noquote(paste("cd C:/Users/XXX/Documents/github/t1 && git add .&& git commit…
Mr.Shukla
  • 1
  • 1
0
votes
1 answer

R script does not run within Slurm batch job

I am running a script that starts as follows: #!/usr/bin/env Rscript #./geneiase -t static -i mydata.tab If I run the script on my data directly in the command line, it starts without errors or warnings. But the program is very demanding…
Sergio.pv
  • 1,380
  • 4
  • 14
  • 23
0
votes
1 answer

How to do a complex search in a dataframe in R?

I have a data frame that has the 14 columns. 2 of those 14 columns are "Region" and "Population Density." Lets say that I want to find all instances when region is 4 and print out what the value of the population density is for each instance of…
0
votes
1 answer

UNC error on a powershell workflow

When I run the following powershell workflow : Function Start-LocalRScript { Param([Parameter(ValueFromPipeline, Mandatory)]$Name) $ScriptPath = "C:\Exploration.RScripts" $RScriptExePath = "C:\Program Files\R\R-3.1.2\bin\Rscript.exe" …
Mario
  • 313
  • 2
  • 11
0
votes
0 answers

Inputs from command line are not taken properly

I'm launching from Windows command line (cmd.exe) the following: C:\Users\lisa>"C:\Program Files\R\R-3.4.0\bin\Rscript.exe" -e rmarkdown::render('O:/ope/Auto/bin/IHYG.Rmd')…
Lisa Ann
  • 3,345
  • 6
  • 31
  • 42
0
votes
1 answer

Stop Rfacebook for loop outputting while still running code

The point in the code is to gather posts from a Facebook page and store them in my_page however i am unfamiliar with the code as it is for a Uni project. The problem i have is that it has to be used in a .rpres format created using Rstudio and as…
Aelux
  • 77
  • 8
0
votes
2 answers

Column Split based on certain separator format

I have a format to separate where I will have this data: df = data.frame(id=c(1,2),name=c('A~B~C','A~B~D'),value=c('1~2~3','1~~2')) id name value 1 A~B~C 1~2~3 2 A~B~D 1~~2 which is expected to have the following output where…
kaexch
  • 15
  • 4
0
votes
1 answer

R server Error: Peer's Certificate issuer is not recoognized | RSiteCatalyst:: GetReportSuites(). Runs good in Desktop version of R

I am pulling data from Omniture sitecatalyst using R. Packages used:Rsitecatalyst using JSON API and when I run GetReportSuites() in R server, I see the following error and it run absolutely fine in desktop version…
Deepu298
  • 65
  • 2
  • 11
0
votes
0 answers

Is there any way to running R code on command prompt widows?

Please help. I want to run myRcode.R on command prompt windows 8. Therefore I tried to use Rscrip.exe. I changed the name of my file to Rscript myRcode.R but command prompt showed an error: “Rscript not recognized as an internal or external command,…
adele
  • 13
  • 4
0
votes
0 answers

How inspect RScript requests at dashDB?

I try to make a POST for RScript in dashDB. Normally my code return 200 for the request, but my code doesn't run. I would like to inspect a log in dashDB, but I don't find in the documentation, how I can make that? Thanks!
0
votes
0 answers

Title doesn't change and whole database not listed in Xaxis ggplot

The cost is listed below.Questionnaire_2f contains 3 variables which is split into ID,Question and Question_response, question_response is a factor containing 6 levels 0-5 for the data and gender_f2 contains simply "M", "F" the same amount of times…
Aelux
  • 77
  • 8
0
votes
0 answers

Knitr Kable won't output can someone tell me why?

I have two Kables, Both will output correctly as a data frame but i want them to be kables as it just looks smarter. This first one works fine as a kable: #Build tables and convert to df #First time=N firstTimeNWork <-…
Aelux
  • 77
  • 8
0
votes
1 answer

Execute R Script from Web Application with Java

I have created a Web Application with Struts, and I would like to execute and R script from a Java class. My script is in the directory: WebContent/script The name is: rScript.R I have checked that a way to execute is using…
jmarco10
  • 451
  • 1
  • 7
  • 21
0
votes
2 answers

How to read results from one R script to another

Is there anyway I can store the results of one variable in one R script, and make them available to another R script? I have this basic script in one…
rurjais
  • 1
  • 1
0
votes
3 answers

Run multiple R scripts concurrently through a batch file

I'm trying to follow the conventional method to trigger R scripts through batch like RScript Example.R but what i look to is some way to run multiple R scripts through a batch file. I tried to do use Start command to open multiple sessions but…
user3338307
  • 21
  • 2
  • 5