Displaying 1 result from an estimated 1 matches for "objfoo".
Did you mean:
objeto
2007 May 25
1
Question about setReplaceMethod
...this) {
frame <- read.csv(file="myfile.csv", header=T) # read some input file
this@x <- frame # this doesn't replace the value for me
setX(this) <- frame # this doesn't replace the value for me
frame # instead I have to return the frame object
})
foo <- function(x,y) {
objFoo <- new("foo", x=data.frame(NULL), y="")
frame <- generateFrame(objFoo) # after this point, nothing got assigned to objFoo@x
setX(objFoo) <- frame # this will work (why do I have to duplicate this??)
}
- adschai
[[alternative HTML version deleted]]