search for: cnfac

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

Did you mean: nfac
2005 Sep 20
5
Neat way of using R for pivoting?
...3.1 I want to produce a plot of SNR vs mean(timeError) with error bars of magnitude 3 sigma. here's what I've got so far (without the error bars. I can't do that yet). I'm sure it's the wrong way to go about this: ******* BEGIN SNIPPET ******* get_stats <- function(t) { cnfac <- factor(t$cnset); mu <- as.list(by(t$snr, cnfac, mean)); tvar <- as.list(by(t$snr, cnfac, var)); t <- list(mu=mu, var=tvar); } vn <- read.table('vn.csv', sep=','); vn_stats <- get_stats(vn); vsn <- read.table('vsn.csv', sep=','); vsn_stats &l...