Displaying 3 results from an estimated 3 matches for "daughter2".
Did you mean:
daughter
2020 Oct 05
2
S4 - inheritance changed by order of setClassUnion and setAs()
Dear colleagues,
there is a behaviour with S4 (virtual) classes that I find very hard to understand: Depending on the position
of setAs(), the tree of inheritance changes.
This is my baseline example that defines the classes "grandma", "mother", "daughter" and a virtual
class "mr_x". For a new instance if "daughter", "mr_x" is betweeen
2020 Oct 06
0
S4 - inheritance changed by order of setClassUnion and setAs()
...lass "mr_y", directly
Class "grandma", by class "mother", distance 2
> setClass("grandma2", slots = c(a = "character"))
> setClass("mother2", slots = c(b = "matrix"), contains = "grandma2")
> setClass("daughter2", slots = c(c = "list"), contains = "mother2")
> setClassUnion(name = "mr_y2", members = c("daughter2", "mother2"))
> setClassUnion(name = "mr_x2", members = c("daughter2", "mother2"))
> getClass("...
2013 Jan 23
4
how to read a df like that and transform it?
...NULL
273 4236 1 49410
281 4163 1 49408
274 4226 1 49406
295 3869 2 49403
49404
287 4113 0 NULL
295 3871 1 49401
292 3895 4 49396
49397
49398
49399
291 3900 3 49392
How to read it into R and transform it like that:
father mother num_daughter daughter1 daughter2 daughter3 daughter4
291 3906 0 NULL
275 4219 0 NULL
273 4236 1 49410
281 4163 1 49408
274 4226 1 49406
295 3869 2 49403 49404
287 4113 0 NULL
295 3871 1 49401
292 3895 4 49396 49397 49398 49399
291 3900 3 49392
library (plyr) and library (reshape2) and other good packages are OK f...