similar to: getopt does not work as expected!

Displaying 20 results from an estimated 4000 matches similar to: "getopt does not work as expected!"

2014 Nov 03
0
Pkg creation: Sweave: multiple files vignette: Error in R CMD check
Hello R-developers! I am creating a package (using devtools and RStudio) and I would like to split my vignette into multiple Rnw-files. As an example I tried the code from: https://support.rstudio.com/hc/en-us/articles/200486298 (--> Working with multiple Rnw files) The Rnw-files work fine with "Complie pdf" in RStudio as well as with Sweave("Master.Rnw"). But, if I try
2003 May 05
1
commandArgs()
Apologies for asking about this, but I don't quite understand how this works after looking through the FAQ and the Help archives. Let's say I want to pass "1000" as an argument to R. I did the following: >R CMD BATCH --1000 infile outfile When I do print( commandArgs() ), I see [1] ".../R.bin" "--restore" [3] "--save"
2011 Jul 29
4
scripting/littler: How to call function named iteratively (`f1`, `f2`, …)?
Dear R folks, wanting to compare different implementations of a solution I want to script it to iterate over the different implementations. Is there a way to do this in the R shell/command line? $ more /tmp/iterf.r f1 <- function(n = 100000, l = 100000) { z = n + l } f2 <- function(n = 100000,
2008 Apr 11
1
make check fails if called with --without-recommended-packages
Hi, just for information: On Suse 10.3 x86 > make check fails, if configure was called with --without-recommended-packages for the latest beta. The problem I stumbled upon is located in utlis. Here comes the relevant part of utils-Ex.Rout.fail in R-2.7.0/tests/Examples > ### ** Examples > > require(stats) > glmout <- capture.output(example(glm)) Fehler in
2007 Nov 05
2
namespace crash on S3method("as.ff",function)
Dear all, I have defined a generic as.ff(x, ...) and a method as.ff.function(x, ...) which converts a standard R function x into a chunked version operating on large ff objects. Everything works fine, but when registering S3method("as.ff",function) in NAMESPACE, the installation fails with some kind of parsing error: adding build stamp to DESCRIPTION installing NAMESPACE file
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
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
2011 Mar 19
1
Undefined symbol "Rf_pythag" while loading spatstat
Today I installed the newest R develepment branch R version 2.14.0 Under development (unstable) (2011-03-18 r54866) on FreeBSD 9.0-CURRENT (amd64). All seems fine so far. After that I updated my R packages with option 'checkBuilt=TRUE'. There are four packages (spatstat, pscl, adehabitatLT, adehabitatHR) which gives an error like this: Error in dyn.load(file, DLLpath = DLLpath, ...) :
2000 Aug 12
1
Batch Execution of R
R Team: This is most likely a trivial question, but after searching docs for several weeks and digging through Rweb and RCGI, I could not clearly identify the method to call an R method from Linux or Win32 systems and send the output to a file. I would like to implement R as part of an online client-server application for a geographically spaced engineering team an would like to know how to run
2006 Nov 10
2
Problems with metaMDS from vegan
Hello all, I recently used the Vegan library quite extensively (in the context of text similarity assessment) on an Ubuntu 6.06 LTS system with R version 2.2.1 (2005-12-20 r36812). The Vegan lib is version 1.6-10. I hit on a problem yesterday, though, when trying to install R and Vegan on two further computers - one Windows XP and one further Ubuntu 6.06 machine, taking either R version 2.4.0
2008 Oct 22
1
R 2.8.0 qqnorm produces error with object of class zoo?
Dear list-reader, by running the following script: library(zoo) sessionInfo() search() packageDescription("zoo") data(EuStockMarkets) dax <- as.zoo(EuStockMarkets[1:10, "DAX"]) daxr <- diff(log(dax)) identical(as.vector(qnorm(daxr)), qnorm(coredata(daxr))) qqnorm(coredata(daxr)) qqnorm(daxr) qqnorm() produces an error: > qqnorm(daxr) Fehler in if (xi == xj) 0L
2005 Nov 22
3
make check fails for R 2.3.0 (PR#8343)
Full_Name: Arne Henningsen Version: 2.3.0, 2005-11-21, i686-pc-linux-gnu OS: SuSE Linux 9.0, Kernel 2.4.21 Submission from: (NULL) (134.245.140.242) I did not find any problems in "./configure" and "make", but "make check" fails: make[4]: Entering directory `/home/suapm095/Download/R-devel/tests/Examples' collecting examples for package 'base' ...
2011 Apr 09
1
How do I make this faster?
I was on vacation the last week and wrote some code to run a 500-day correlation between the Nasdaq tracking stock (QQQ) and 191 currency pairs for 500 days. The initial run took 9 hours(!) and I'd like to make it faster. So, I'm including my code below, in hopes that somebody will be able to figure out how to make it faster, either through parallelisation, or by making changes. I've
2005 May 10
2
filename
Hey, I'm generating a .jpeg file for a web application passing parameters to R via cgi. R gets the parameters by using commandArgs, which are passed to a variable named j and z j<-commandArgs()[3] z<-commandArgs()[4] Later I want to use the characters strings of the argument which the variables are holding for my filename, e.g.: jpeg(file="d:/data/images/jz.jpeg",...)
2009 Aug 28
1
How to convert a string passed as an argument to a vector?
Hi, $ cat commandArgs.R args=commandArgs(trailingOnly=TRUE) args[1]+10 I have the above code. But the following command line gives me an error. I am wondering what is the correct way to convert a string to a vector? $ Rscript commandArgs.R 1:3 > args=commandArgs(trailingOnly=TRUE) > args[1]+10 Error in args[1] + 10 : non-numeric argument to binary operator Execution halted Regards, Peng
2002 Jun 25
1
commandArgs: feature request
Dear R-core Team, As Thomas Lumley pointed out in one of his e-mails one can use commandArgs() to get a copy of the command line arguments supplied when R session was invoked and then use grep to extract parameters of interest. His solution works very well if the custom options are passed by names, e.g. --my-option=value, but what if one wants to pass parameters by their positions. Then it's
2009 Feb 17
3
R scripts and parameters
A couple of weeks ago I asked how it is possible to run an R script (not a function) passing some parameters. Someone suggested the function "commandArgs()". I read the on-line help and found no clarifying example. Therefore I do not know how to use it appropriately. I noticed this function returns the pathname of the R executable which is not what I need. I meant to ask if it is
2011 Mar 14
1
Rscript, hashbang, and arguments
Hi, I have a bunch of R scripts which have the hash bang !/usr/bin/env Rscript and I typically run these scripts by passing in some parameters like this: ./nameOfRScript arg1 arg2 ... I know Rscript has the option to run in --vanilla. Where exactly do I insert the --vanilla option? When I do something like this: ./nameOfRScript --vanilla arg1 arg2 ... And I try to access the commandArgs,
2008 Jan 05
1
Rscript argument processing minor bug with -g
I think there's a minor bug in the argument-processing carried out by Rscript. The effect is that if one passes "-g" as a flag to the script, it is erroneously exposed to the main executable's argument processing and therefore generates a message about not being able to comply with the request for a particular GUI. Uppercase G is fine as are the other 25 letters in upper or
2012 May 03
1
is there a way of identifying batch mode running?
Hello list Is there a way of identifying from within R whether a script has been source(d) from Rgui.exe or via Rscript.exe in batch mode? For the code I have I use the commandArgs() function to pick up command line args when running in batch mode via Rscript.exe However I like to get the code working manually first using source("MyRCode.r") I'd like to be able to put something at