Below is a code sample:
#!/usr/bin/env Rscript
library(MASS)
x1 <- read.table("x")
x2 <- read.table("gg0.5/cc.log")
x3 <- read.table("gg0.1/cc.log")
cc <- matrix(c(x1$V1, mean(x1$V1), x2$V1, mean(x2$V1), x2$V2, mean(x2$V2), x3$V2, mean(x3$V2)), ncol=4)
write.matrix(format(cc, digit=3), sep='|')
It looks tedious, but much more concise and error proof to code them myself. Using a '|' separator can make it easier to convert the results to be included in org mode. Format command can be used for different data blocks to form a new matrix.
没有评论:
发表评论