Displaying 6 results from an estimated 6 matches for "subassignargs".
2002 Jan 07
1
Mishandling missing "..." (PR#1247)
R> myfun <- function(x, ...) {x[...] <- 0; x}
R> myfun(3)
Error in myfun(3) : SubAssignArgs: invalid number of arguments
It fails because no ... was passed. The workaround (and desired behavior) is:
R> myfun <- function(x, ...) {if (missing(...)) x[] <- 0 else x[...] <- 0; x}
R> myfun(3)
[1] 0
Deja vu? This is the one piece of my PR#1110 (Oct 3, 2001) that I think ma...
2001 Oct 12
1
More trouble with empty subsets
...g, with no default
Bug, or merely different from S-Plus?
-- David Brahm (brahm at alum.mit.edu)
Peter Dalgaard <p.dalgaard at biostat.ku.dk> in thread [Trouble with 3-dots] said:
> Time might be better spent figuring out why
> > "[<-"(x,value=0)
> Error: SubAssignArgs: invalid number of arguments
> whereas x[]<-0 works fine. (So does "[<-"(x,,value=0), which could be
> part of the explanation).
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-F...
2001 Oct 03
0
Several R vs S-Plus issues (PR#1110)
...eX encounters an error. My R fix is:
R> system("cd mydir; echo x | latex myfile")
Note that it's not as simple as cmd <- paste("echo",input,"|",cmd).
3) R> myfun <- function(x, ...) {x[...] <- 0; x}
R> myfun(3)
Error in myfun(3) : SubAssignArgs: invalid number of arguments
It failed because no ... was given. Fortunately, this is easily patched:
R> myfun <- function(x, ...) {if (missing(...)) x[]<-0 else x[...]<-0; x}
4) Missing functions:
a) identical() [scheduled for 1.4.0]
b) slice.index()
c) rowSums(), co...
2001 Oct 03
0
RE: [R] Several R vs S-Plus issues (PR#1112)
...counters an error. My R
fix is:
R> system("cd mydir; echo x | latex myfile")
Note that it's not as simple as cmd <-
paste("echo",input,"|",cmd).
3) R> myfun <- function(x, ...) {x[...] <- 0; x}
R> myfun(3)
Error in myfun(3) : SubAssignArgs: invalid number of arguments
It failed because no ... was given. Fortunately, this is easily
patched:
R> myfun <- function(x, ...) {if (missing(...)) x[]<-0 else
x[...]<-0; x}
4) Missing functions:
a) identical() [scheduled for 1.4.0]
b) slice.index()
c) rowSums...
2001 Oct 03
8
Several R vs S-Plus issues
...eX encounters an error. My R fix is:
R> system("cd mydir; echo x | latex myfile")
Note that it's not as simple as cmd <- paste("echo",input,"|",cmd).
3) R> myfun <- function(x, ...) {x[...] <- 0; x}
R> myfun(3)
Error in myfun(3) : SubAssignArgs: invalid number of arguments
It failed because no ... was given. Fortunately, this is easily patched:
R> myfun <- function(x, ...) {if (missing(...)) x[]<-0 else x[...]<-0; x}
4) Missing functions:
a) identical() [scheduled for 1.4.0]
b) slice.index()
c) rowSums(), co...
2001 Oct 03
8
Several R vs S-Plus issues
...eX encounters an error. My R fix is:
R> system("cd mydir; echo x | latex myfile")
Note that it's not as simple as cmd <- paste("echo",input,"|",cmd).
3) R> myfun <- function(x, ...) {x[...] <- 0; x}
R> myfun(3)
Error in myfun(3) : SubAssignArgs: invalid number of arguments
It failed because no ... was given. Fortunately, this is easily patched:
R> myfun <- function(x, ...) {if (missing(...)) x[]<-0 else x[...]<-0; x}
4) Missing functions:
a) identical() [scheduled for 1.4.0]
b) slice.index()
c) rowSums(), co...