Displaying 1 result from an estimated 1 matches for "list_of_a_object".
Did you mean:
list_of_a_objects
2014 Feb 19
0
dispatch on "c" method when passing named arguments
...if (missing(x)) {
objects <- list(...)
x <- objects[[1L]]
} else {
objects <- list(x, ...)
}
new(class(x), aa=unlist(lapply(objects, slot, "aa"),
use.names=FALSE))
}
)
raw_input <- list(chr1=1:3, chr2=11:12)
list_of_A_objects <- lapply(raw_input, function(aa) new("A", aa=aa))
Then:
> do.call("c", list_of_A_objects)
An object of class "A"
Slot "aa":
[1] 1 2 3 11 12
==> all is fine.
But:
setClass("B", contains="A")
list_of_B_ob...