similar to: Is a .R script file name available inside the script?

Displaying 20 results from an estimated 8000 matches similar to: "Is a .R script file name available inside the script?"

2009 Jan 30
1
Using Rscript
Dear List, Hopefully someone will point me to a piece of documentation that I have overlooked. I am running Rscript successfully to read and execute an R program, but have failed to find the correct syntax to route the output to a file using the Rscript command that invokes the job. I tried Rscript -e 'sink("outputfile")' script.R , but it then ignored the scriptfile. I know
2012 May 31
3
RScript.exe and map directory issue
Hi, I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within Excel 2010 with the following code: Call Shell(rPath & "\Rscript.exe C:\Work\Latest\_Test.R", vbHide) The good news is: the above code works perfectly, but ... If I add white spaces to my map directory, like: Call Shell(rPath & "\Rscript.exe C:\Work\Latest 1\_Test.R", vbHide) In the
2009 Aug 05
1
exec subdirectory of a package
Hello, WRE contains the following information about the "exec" subdirectory of a package : "Subdirectory exec could contain additional executables the package needs, typically scripts for interpreters such as the shell, Perl, or Tcl. This mechanism is currently used only by a very few packages, and still experimental." I think it would be useful to expand "very
2009 Jul 13
2
how to run a R program with input arguments
I am a beginner in R and know only a little about it yet. I have a script written in R language, named as "a.txt" for example. I am using a Linux machine, at present I only know that I can type "R" in the terminal and then copy-paste the content in "a.txt" to the R's interface to execute the program. However, I want to know if there is any method that allows me to
2006 Mar 04
2
plots - paper vs presentation colors
Hi, I can't find a simple command to switch the plot colors from paper to presentation formats. Has anyone defined styles that can be easily applied in one command? It would be nice to have a command for papers, using ps or eps outputs, that has a white background and colors that will print nicely on that. On the other hand, it would be nice to have exactly the same plot for a presentation
2006 Jan 02
2
RODBC help
Dear Prof. Ripley et al., I have a data frame with some variable names that contain the underscore character ('_'). It seems that RODBC is not converting them to a suitable variable name for MySQL. > sqlSave(channel, zz, addPK = TRUE, verbose = TRUE) Query: CREATE TABLE zz (rownames varchar(255) PRIMARY KEY, NAME varchar(255), ID varchar(255), GROUP varchar(255), OAC_RT double,
2004 Nov 11
4
Questions on package creation
I have some questions about 1. nomenclature, 2. recommended file locations and 3. overall procedure related to creating packages. To the extent that it matters, examples here relate to Windows XP R 2.0.1 beta. The questions are interspersed and prefaced with ***. My understanding is that there are actually 6 forms of a package that one should use in package development: 1.
2006 Sep 17
2
currency or stock trading strategy
Hi, are there any good charting and analysis tools for use with currencies, stocks, etc. in R? I have some tools to download currency data from the NYFRB using python and XML. Can we get and parse an XML download using R? Can we have interaction in R plots? Does anyone use R for back-testing trading strategies? Are there any forums for discussion of using R for this specific purpose (apart
2009 Jan 09
1
snow and different R versions
Dear Luke and others, I have many R versions on my machine and want to start a particular one when snow builds its cluster. (The same version I start snow from.) It seems that everything is set up correctly in defaultClusterOptions: > mget(ls(defaultClusterOptions), defaultClusterOptions) $homogeneous [1] TRUE $manual [1] FALSE $master nodename "maya.unil.ch" $outfile [1]
2004 Nov 28
1
Version names
I have Windows XP build scripts that look for R in a variety of folders and if multiple ones are found, takes the last one. For example, I currently have the following in \Program Files\R : rw1060 rw1062 rw1071 rw1071beta rw1081 rw1090 rw1090dev rw1091 rw1091pat rw2000 rw2001beta Note that it currently correctly gets rw2001beta but if I add rw2001 then it will not pick it up since
2002 Feb 27
3
BATCH mode
Dear R users I wonder if it is possible to run R code in the batch mode like in Splus (Splus5 scriptfile outputfile). Any hints? Andreas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the
2007 Apr 01
2
commandArgs usage and --args invokation
Dear R experts: I am a bit stymied by how the argument picking-off works in R batch file usage. $ cat commandArgs.R cat(" Command Line Arguments were ", commandArgs(), "\n"); $ /usr/bin/R CMD BATCH commandArgs.R --args 1 2 3 $ /usr/bin/R --args 1 CMD BATCH commandArgs.R ... I am now getting into interactive mode ?! I guess it really is skipping the rest of the command line
2005 May 11
1
2 factor ANOVA and sphericity
With respect to calculating the epsilon index of sphericity for ANOVA, discussed on pp. 45-47 of: http://www.psych.upenn.edu/~baron/rpsych.pdf It notes that epsilon is not required for a repeated measures design with only k=2 levels, as the minimum value of epsilon (e) is given by: e = 1/(k-1) so for k=2, we have e = 1 (ie, no correction of the F test df; see p. 46). These notes apply to a
2019 Jun 04
2
MacOS parallel::makeCluster fails
Hi all, The call parallel::makeCluster(1L) hangs infinitely on my MacOS machine which seems to be already reported by some people (e.g., https://stat.ethz.ch/pipermail/r-devel/2018-February/075565.html). However, the solutions posted on SO, GH or R-devel do not work in my case. So far, I unsuccessfully tested ? 1. Couple of reboots 2. Adding 192.0.0.1 to /etc/hosts 3. Using R.app
2008 Oct 17
2
R script from Python
Hi, I'm trying to execute R-script from Python. I'm using R 2.7.2, Python 2.5 and WinXP. I don't won't to use Python/R interface because of nature of project. Python code : import subprocess command = 'c:\\Program Files\\R\\R-2.7.2\\bin\\Rterm.exe --vanilla -q <d:\\test\\run\\geneBank.r> d:\\output.out' subprocess.Popen(command).wait() After that, I get error
2006 Mar 16
6
File Auditing with rails - File I/O issue
Hey Folks, I''ve written a script to generate a list of all files on a machine, then zip the results. ?I''m going to stick a web front end on it, and use it to audit some file servers. The problem is that the ZIP compression/decompression isn''t working, but its not what you might think. ?The script completes, but seems to not actually write anything. Here is a short
2006 Aug 11
1
x tick labels - sparse?
Hi, I'm stuck on creating a plot with x tick labels for every Nth tick mark - how is that done? I don't see a simple solution to this in help(plot) or help(par) and what I've tried is not working, eg, the following does not work, although it seems intuitive to me that it should work: x <- seq(-100,1000,25) y <- x * x % find all the x values that are multiples of 100 tmp <-
2003 Aug 31
3
Problem and Question regarding R
Hi, I'm just about to install the Precompiled Binary Distribution of R from CRAN for SuSE Linux 8.2: R-base-1.7.1-1.i386.rpm My system is SuSE Linux 8.2 Professional Edition on a Pentium 4: # uname -a Linux linux 2.4.20-4GB #1 Mon Mar 17 17:54:44 UTC 2003 i686 unknown unknown GNU/Linux 1) Problem: I've tried to install the above base rpm archive with the command: # rpm -i
2009 Jun 09
1
scatterplot (car) legend modification
hi, new to R and using the car package to do some scatterplots with ellipses hoping to add the area and center points of each ellipse to the legend? looking for some direction / ideas.... here is the script, the data is where golf shots end up by club. x (dispersion), y (distance), group (Club) thanks, sam ## usage: Rscript shotScatter.R infile outfile level1 level2 minX maxX minY maxY
2005 Jun 03
3
plots from batchfile on windows
Hi, On windows I'd like to run a batchfile that leaves me a plot. As a test I have the scriptfile "test.r" which only contains: x <- 1:10; y <- sample( 10 ) plot( x, y ) Now I tried the following (but nothing worked): a) "R --vanilla < test.r" in the cmd window, => that doesn't give me a plot b) the same, but I added