search for: tp1013365p1013397

Displaying 1 result from an estimated 1 matches for "tp1013365p1013397".

2010 Jan 13
3
Operating on each row of data frame
Hi All I have a data frame in which there are 4 columns . Column 1 : name Column 2-4 : values I would like to calculate mean/Standard error of values in column 2-4 and store them in column 5,6 respectively. I have done the following but doesn't seem to work mean_N_SE <-function(x) { name <- x[1] vals <- c(x[2:4]) temp_mean <- mean(vals) SE <- sqrt(var(x)/length(x)) }