similar to: Bootstrap error message: Error in statistic(data, original, ...) : unused argument(s) ( ...)

Displaying 20 results from an estimated 7000 matches similar to: "Bootstrap error message: Error in statistic(data, original, ...) : unused argument(s) ( ...)"

2006 Apr 20
1
Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...)
> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Michael > Sent: Thursday, April 20, 2006 3:50 AM > To: R-help at stat.math.ethz.ch > Subject: [R] Bootstrap error message: Error in > statistic(data, original, ...) : unused argument(s) ( ...) [Broadcast] > > > Dear colleagues, >
2006 Apr 20
1
Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...) [Broadcast]
I quoted the relevant part of the documentation for you. Have you actually try to read what it says? Sure, you don't get any error, but have you checked whether any bootstrapping was actually done? Most of those functions are generics, thus having the "..." argument that can take anything. Doesn't mean they will be used. See if the following helps: > x <- 1:10 >
2008 Feb 21
1
bootstrap: definition of original statistic
Hi, In the boot package, the original statistic is simply the statistic function evaluated on the original data (called t0). However, in Harrell et al 1996 "Multivariable prognostic models..." Stats Med vol 15, pp. 361--387, it is different (p. 372): The statistic function evaluated on the original data is called "D_app" (apparent statistic), whereas "D_orig"
2011 Jul 23
1
call a function with explicitly not setting an argument
Is there a way to call a function, and explicitly set an argument to 'not specified'? My situation is the following. I have a function which passes on most of its arguments to another function. The second function, myfun2, serializes all arguments and is out of my control. myfun <- function(...){ return(myfun2(...)); } now, the value for arguments of myfun are stored in variables.
2006 Aug 16
1
Problem with the special argument '...' within a function
I'm not sure if this is what you want, but simply add ... to the list of arguments for fun1 and fun2 would eliminate the error. Andy From: Hans-Joerg Bibiko > > Dear all, > > I wrote some functions using the special argument '...'. OK, it works. > > But if I call such a function which also called such a > function, then I get an error message about unused
2006 Sep 27
2
How to pass expression as an argument
Hi, I am writing a function and need to pass a function expression as an argument, for instance, myfun <- function( express) { x<- c(1,2,3) y<-express } if I call the above function by myfun( x*2 ), I get 2 as the result, instead of 2,4,6 , could someone help me to fix this problem ? Furthermore, is that
2018 Nov 29
0
Unexpected argument-matching when some are missing
> When trying out some variations with `[.data.frame` I noticed some (to me) > odd behaviour, Not just in 'myfun' ... plot(x=1:10, y=) plot(x=1:10, y=, 10:1) In both cases, 'y=' is ignored. In the first, the plot is for y=NULL (so not 'missing' y) In the second case, 10:1 is positionally matched to y despite the intervening 'missing' 'y=' So it
2003 Apr 17
4
A function as argument of another function
Dear all, I would like to write a function like: myfun<-function(x,fn) {xx<-exp(x); x*fn(xx)} where fn is a symbolic description of any function with its argument to be specified. Therefore myfun(5,"2+0.3*y^2") should return 5*(2+0.3*exp(5)^2), myfun(5,"log(y)") should return 5*log(exp(5)) and so on. I tried with "expression" and others, but without success.
2018 Nov 29
0
Unexpected argument-matching when some are missing
On Thu, Nov 29, 2018 at 5:09 AM Emil Bode <emil.bode at dans.knaw.nl> wrote: > > When trying out some variations with `[.data.frame` I noticed some (to me) odd behaviour, which I found out has nothing to do with `[.data.frame`, but rather with the way arguments are matched, when mixing named/unnamed and missing/non-missing arguments. Consider the following example: > > > >
2011 Feb 06
1
boot() versus loop, and statistics option
Hello R users I am quite new to bootstrapping. Now, having some data x, ---- R: set.seed(1234) R: x <- runif(300) ---- I want to bootstrap simple statistics, mean and quantiles (.025, .975). Currently, I run a loop ---- R: res <- as.data.frame(matrix(ncol = 3, dimnames = list(NULL, ... c("M", "Lo", "Hi")))) R: for (i in 1:100) { ... y <-
2018 Nov 29
3
Unexpected argument-matching when some are missing
On Thu, Nov 29, 2018 at 10:51 AM S Ellison <S.Ellison at lgcgroup.com> wrote: > > > When trying out some variations with `[.data.frame` I noticed some (to me) > > odd behaviour, > > Not just in 'myfun' ... > > plot(x=1:10, y=) > plot(x=1:10, y=, 10:1) > > In both cases, 'y=' is ignored. In the first, the plot is for y=NULL (so not
2011 Sep 17
0
Problem using SNOW with data frame as a function argument
Hello I would like to use SNOW to parallelise some computations to be made on columns of a data frame, using different parameter values for each SNOW "worker". I gather(?) clusterMap() is the appropriate SNOW function to do something like this. I suspect the problem lies in the fact that I am only supplying one data frame argument for the flow.dat function argument yet the a, b, and x
2018 Nov 29
4
Unexpected argument-matching when some are missing
When trying out some variations with `[.data.frame` I noticed some (to me) odd behaviour, which I found out has nothing to do with `[.data.frame`, but rather with the way arguments are matched, when mixing named/unnamed and missing/non-missing arguments. Consider the following example: myfun <- function(x,y,z) { ? print(match.call()) ? cat('x=',if(missing(x)) 'missing'
2007 Jan 28
0
"[", .local and S4 methods (was: "[" operator and indexing ambiguity)
Dear Tony, thanks for the tip with "nargs", when suitably applied, this answers the problem. The behaviour of "nargs" in S4 methods has some subtleties compared to that in normal functions, as shown in the example below. I admit that this is what had earlier created some confusion about the semantics of "nargs". From the perspective of "nargs" and its
2009 Jun 12
1
how to trigger variable creation?
Hello R users, i'm wondering how to trigger variable creation. Whenever a variable is created i want my own function myFun(...) to be started. if (exists("x")) {rm(x)} # after removal of x # any of these calls x<-10 # should call myFun x=10 # should call myFun assign(x,10) # should call myFun etc.
2007 Oct 25
3
Deparsing part of a list argument
Here's a simple example of the type of function I'm trying to write, where the first argument is a list of functions: myfun <- function(funlist, vec){ tmp <- lapply(funlist, function(x)do.call(x, args = list(vec))) names(tmp) <- names(funlist) tmp } > myfun(list("Summation" = sum, prod, "Absolute value" = abs), c(1, 4, 6, 7)) $Summation [1]
2006 Feb 02
2
How to get the namespace of a function?
I declared the environment of the function myfun to be NULL as follows: environment(myfun) <- NULL Later on I called that myfun and got an error message because the function index() in the zoo package was called inside myfun and was not visible: Error in myfun(args) : couldn't find function "index" I tried to use zoo::index() instead of index(), but that did not work. In fact,
2010 Sep 03
3
S4 Method Signatures
Hello, If the signature of a method defines which generic it implements then I'm confused about why this minimal example I invented won't work : setGeneric("myFun", function(rs, ...){standardGeneric("myFun")}) setGeneric("myFun", function(cs, ...){standardGeneric("myFun")}) setMethod("myFun", "numeric", function(rs, colour =
2012 Jul 05
1
Extracting srcref for S4 methods
Hi, on R version 2.15.1 (2012-06-22) (Platform: i686-pc-linux-gnu (32-bit)) sourced functions have srcref attached as an attribute. Are such data also available for S4 generics and methods? How? (See sample code below) Thank you. Bests, Renaud f <- textConnection( " f <- function(){} setGeneric('myfun', function(x, ...) standardGeneric('myfun'))
2011 Feb 02
1
pass nrow(x) to dots in function(x){plot(x,...)}
Dear Rers, I have a function to barplot() a matrix, eg myfun <- function(x, ...) { barplot(x , ... )} (The real function is more complicated, it does things to the matrix first.) So I can do: m1 <- matrix(1:20,4) myfun(m1) myfun(m1, main="My title") I'd like to be able to add the number of rows of the matrix passed to the function to the "..." argument, eg