I think that your 'C' column is a factor(or character), because the
character used(comma).
One option:
dat$C <- as.numeric(gsub(",", ".", as.character(dat$C)))
library(doBy)
summaryBy(C ~ B, data=dat, FUN=c(median, var), na.rm = T)
On 09/03/2008, Agrarimmobilien <[EMAIL PROTECTED]> wrote:
> H
Agrarimmobilien
Gesendet: Sunday, March 09, 2008 4:38 PM
An: R-help@r-project.org
Betreff: [R] transforming column of a dataframe by var- and median-functions
Hello,
I try to transform a data frame like
ABC
112,5
22NA
311,0
41
Hello,
I try to transform a data frame like
ABC
112,5
22NA
311,0
4156
5223
61NA
7246
to the following dataframe, calculating the variance and median of the
C-column,
3 matches
Mail list logo