similar to: Problem with hasArg and the ... argument (PR#7027)

Displaying 20 results from an estimated 500 matches similar to: "Problem with hasArg and the ... argument (PR#7027)"

2003 Mar 06
1
Some bugs in Rcmd check ? (PR#2608)
Hello! I have some problems using Rcmd, bacause I get errors I do not understand. I will write down what I did. Perhaps you can help me? I have a small would-be package called "globaltest", containing only the files DESCRIPTION INDEX R/globaltest.R man/globaltest.Rd I say: C:\>Rcmd check C:/Goeman/globaltest In the output it first complains that 'sh', 'make',
2004 Oct 14
3
is.vector() gives error (PR#7288)
Full_Name: Jelle Goeman Version: 2.0.0 OS: windows Submission from: (NULL) (145.88.209.33) I get a strange error: > is.vector(1:10) Error: recursive default argument reference What's recursive about is.vector? Kind regards, Jelle Goeman My R: platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2
2004 Jan 23
1
Problem with hasArg() using R-files
Please do give reproducible example. The code you gave, which you claimed `works correctly' doesn't: > SDT.Optim <- function(crit = NULL, Hess = F) + { + q <- length(par); x <- data + if(hasArg(crit)) + cat("\n Crit present\n") + else +
2009 Mar 03
1
profiler and loops
Hello, (This is follow up from this thread: http://www.nabble.com/execution-time-of-.packages-td22304833.html but with a different focus) I am often confused by the result of the profiler, when a loop is involved. Consider these two scripts: script1: Rprof( ) x <- numeric( ) for( i in 1:10000){ x <- c( x, rnorm(10) ) } Rprof( NULL ) print( summaryRprof( ) ) script2:
2012 Jul 02
1
Dependency problem for "hasArg"
Dear list, I'm running an R script which first line is: #!/usr/bin/Rscript While running that script from the system console (in Red Hat Enterprise Linux 6) I got the following error: Error in plot2(x = sim, y = obs, plot.type = "single", main = paste("Daily", : could not find function "hasArg" Calls: plot_results -> plot_out -> ggof -> plot2
2007 Feb 21
1
avoiding a needless function evaluation in optimize() (PR#9523)
Full_Name: Jelle Goeman Version: 2.4.0 OS: windows XP Submission from: (NULL) (145.88.209.33) Hi, I like to use optimize() to optimize functions whose evaluation is costly in terms of computation time. The Brent algorithm which is implemented in optimize was designed to optimize a function with as few function evaluations as possible. Therefore it bothers me that optimize() always evaluates
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded C functions on a Sparc 10 with R compiled using cc (both R-0.49 and R-0.50). I get sporadic errors with the error message: Error: character variables must be duplicated in .C/.Fortran, with C functions which pass character variables. my C functions look like: anyfunc(char **filename, other variables ) This error message appears about 25%
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded C functions on a Sparc 10 with R compiled using cc (both R-0.49 and R-0.50). I get sporadic errors with the error message: Error: character variables must be duplicated in .C/.Fortran, with C functions which pass character variables. my C functions look like: anyfunc(char **filename, other variables ) This error message appears about 25%
2020 Feb 26
1
Profiling: attributing costs to place of invocation (instead of place of evaluation)?
Hi Consider the following example: f <- function(expr) g(expr) g <- function(expr) { ? h(expr) } h <- function(expr) { ? expr # evaluation happens here ? i(expr) } i <- function(expr) { ? expr # already evaluated, no costs here ? invisible() } rprof <- tempfile() Rprof(rprof) f(replicate(1e2, sample.int(1e4))) Rprof(NULL) cat(readLines(rprof), sep = "\n") #>
2002 Jul 19
1
Rprof and setMethod conflict?
I noticed this oddity about R profiling and setMethod. First, I "test out" Rprof. > require(methods) Loading required package: methods [1] TRUE > > Rprof("test.out") > data.frame("a") X.a. 1 a > Rprof(NULL) So far, so good. Next, I define myClass. > setClass("myClass", representation(mySlot = "numeric")) [1]
2016 Jun 04
1
RProfmem output format
I'm picking up this 5-year old thread. 1. About the four memory allocations without a stacktrace I think the four memory allocations without a stacktrace reported by Rprofmem(): > Rprofmem(); x <- raw(2000); Rprofmem("") > cat(readLines("Rprofmem.out", n=5, warn=FALSE), sep="\n") 192 :360 :360 :1064 :2040 :"raw" are due to some
2008 Aug 22
0
R CMD check warning "no visible binding for global variable" and hasArg()
Hi R-devels, latetely I reported having problems with understanding warnings issued by a devel version of R CMD check, which Brian Ripley in his reply https://stat.ethz.ch/pipermail/r-devel/2008-August/050493.html correctly attributed to my using an outdated version (July 29) --- you really have to be quick with updating these days! Having switched to a more recent version, R CMD check
2011 Oct 07
1
modify "..." (optional args)
Hi all, Is there a way to modify the optional arguments (...) passed to a function, so that these can be passed in modified form to a subsequent function call? I checked "Programming with Data" but could not find a solution there. What I'd like is something along these lines: test <- function(x,y,...) { if(!hasArg(xlab)) { ___add xlab to ...___ } if(hasArg(xlab)) {
2009 Oct 14
1
different L2 regularization behavior between lrm, glmnet, and penalized?
The following R code using different packages gives the same results for a simple logistic regression without regularization, but different results with regularization. This may just be a matter of different scaling of the regularization parameters, but if anyone familiar with these packages has insight into why the results differ, I'd appreciate hearing about it. I'm new to
2003 Sep 16
7
Retrieve ... argument values
Dear R users, I want to retrieve "..." argument values within a function. Here is a small exmaple: myfunc <- function(x, ...) { if (hasArg(ylim)) a <- ylim plot(x, ...) } x <- rnorm(100) myfunc(x, ylim=c(-0.5, 0.5)) Error in myfunc(x, ylim = c(-0.5, 0.5)) : Object "ylim" not found > I need to retrieve values of "ylim" (if it is defined
2005 Aug 18
1
problem with repeated formal arguments and ...
I want to add an argument if it is not present. Following the Green Book, p. 337: test <- function(x, ...){ dots <- list(...) if (!hasArg(from)) from <- 0 else from <- dots$from curve(x, from=from, ...) } > test(sin) > test(sin, from=4) Error in curve(x, from = from, ...) : formal argument "from" matched by multiple actual arguments The FAQ says, in
2007 Nov 30
1
Puzzling message: "no man files in this package"
Dear R developers, When building/checking my package (in R 2.6.1 under windows) I run into some messages that I do not completely understand and that do not give me precise enough leads to pinpoint where the error in my package is. I would be very grateful for any suggestions. Did anyone else encounter the same problem before? When building or installing the package, I get the message (no error
2013 Mar 28
1
Error in setMethod("combine"... was - Error when installing globaltest package
Hi All, I posted this on the bioconductor list and didn't get a response there, so I'm hoping someone here can help. I don't know a heck of a lot about R, so I apologize if this seems like a trivial issue. This error comes up when trying to install the bioconductor globaltest package. Any clues? Thanks! Rusty -----Original Message----- From: bioconductor-bounces at r-project.org
2011 Oct 19
0
warnings issued at installation time not reported by 'R CMD check'
Hi, Warnings issued at installation time are not reported by 'R CMD check'. Some of them are really important and telling something very useful to the developer. See for example this warning: http://bioconductor.org/checkResults/2.9/bioc-LATEST/globaltest/wilson2-checksrc.html Actually, there is no formal warning reported by 'R CMD check' for this package but if you scroll
2017 Aug 31
2
LLD: patch to fix libCOFF calling exit() on success in a library function
I believe that LLD is not supposed to call exit on success when you call lld::coff::link. >From downstream fork of LLD: https://github.com/zig-lang/zig/commit/41da9fdb69065082f57c604b12eb02ca166cb18d diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 854c3e69098..8b17f039870 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -1030,7 +1030,7 @@ void