Re: [R] transforming column of a dataframe by var- and median-functions

2008-03-09 Thread Henrique Dallazuanna
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

Re: [R] transforming column of a dataframe by var- and median-functions

2008-03-09 Thread Daniel Malter
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

[R] transforming column of a dataframe by var- and median-functions

2008-03-09 Thread Agrarimmobilien
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,