thanks rui, it helps indeed..
at first, I've been trying to data.frame the output of mean (mycenfit)
by the following:
my.df<-as.data.frame(do.call(rbind, mean(mycenfit)))
and it worked out correctly!
...but because I also needed the information about "n" and "n.cen",
which are not provided b
Hello,
Perhaps the easiest way is with ?capture.output:
dat <- read.table(text = capture.output(print(mycenfit)),
stringsAsFactors = FALSE)
str(dat)
'data.frame': 3 obs. of 5 variables:
$ n : int 3 3 3
$ n.cen : int 1 1 2
$ median: int 2 2 NA
$ mean : num 2.33 2.33 2
$ sd
given this reproducible example:
#start code
df<-structure(list(lq = c(TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE,
FALSE, FALSE), value = c(1, 3, 1, 2, 0.5, 2, 1, 2, 3), group =
structure(c(1L, 1L, 2L, 2L, 3L, 3L, 3L, 1L, 2L), .Label = c("A", "B",
"C"), class = "factor")), .Names = c("lq", "v
3 matches
Mail list logo