an convert back to a true data frame
>
> > as.data.frame(after.group_by)[4]
>Value
> 1 69.47
> 2 64.61
> ...etc.
>
> ## dput() code below
>
> structure(list(Id = structure(1:10, .Label = c("P01", "P02"
structure(list(Id = structure(1:10, .Label = c("P01", "P02",
"P03", "P04", "P05", "P06", "P07", "P08", "P09", "P10"), class = "factor"),
Sex = structure(c(2L, 1L, 1L, 2L, 2L, 2L, 1L, 2L
100 )
dat1[2]
John Kane
Kingston ON Canada
> -Original Message-
> From: john.pos...@mjbiostat.com
> Sent: Fri, 21 Nov 2014 17:10:16 +0000
> To: r-help@r-project.org
> Subject: [R] dplyr/summarize does not create a true data frame
>
> I got an error when trying
I got an error when trying to extract a 1-column subset of a data frame (called
"my.output") created by dplyr/summarize. The ncol() function says that
my.output has 4 columns, but "my.output[4]" fails. Note that converting
my.output using as.data.frame() makes for a happy ending.
Is this the in
4 matches
Mail list logo