Difference between revisions of "OR1Expt.R"
From Organic Design wiki
(No {{r}}/{{R}} GeSHi highlighter use {{perl}} instead) |
|||
Line 1: | Line 1: | ||
{{perl}} {{#security: Sven,Goldfinger}} | {{perl}} {{#security: Sven,Goldfinger}} | ||
+ | |||
+ | # ------------------------- OR1 dataset analysis ------------------------------ # | ||
sourceDir <- "/Volumes/HD2/Clinton/Data" | sourceDir <- "/Volumes/HD2/Clinton/Data" | ||
− | filename <- dir(sourceDir, pattern="OR1.+\.txt") | + | filename <- dir(sourceDir, pattern="OR1.+\.txt") |
− | dset <- read.table(file.path(sourceDir, filename), sep="\t", header=TRUE) | + | dset <- read.table(file.path(sourceDir, filename), sep="\t", header=TRUE) |
dim(dset) | dim(dset) | ||
Line 18: | Line 20: | ||
# y ~ x | (z * w) | # y ~ x | (z * w) | ||
+ | # help(xyplot), help(panel.superpose) | ||
xyplot( RE ~ AM, data=dset) | xyplot( RE ~ AM, data=dset) | ||
xyplot( RE ~ Timepoint| AM * Treatment, data=dset, panel.superpose=dset$Amount, groups=Amount) | xyplot( RE ~ Timepoint| AM * Treatment, data=dset, panel.superpose=dset$Amount, groups=Amount) | ||
+ | |||
+ | # Anova example | ||
+ | # help(aov), help(summary) | ||
+ | aovobj <- aov(RE ~ AM*Treatment, data=dset) | ||
+ | summary(aovobj) |
Revision as of 23:08, 7 May 2007
Our Perl scripts. {{#security: Sven,Goldfinger}}
- ------------------------- OR1 dataset analysis ------------------------------ #
sourceDir <- "/Volumes/HD2/Clinton/Data" filename <- dir(sourceDir, pattern="OR1.+\.txt")
dset <- read.table(file.path(sourceDir, filename), sep="\t", header=TRUE)
dim(dset) summary(dset)
- Convert names
colnames(dset)[4:5] <- c("AM","RE")
library(lattice)
- Formulas
- y ~ x
- y ~ x | z
- y ~ x | (z * w)
- help(xyplot), help(panel.superpose)
xyplot( RE ~ AM, data=dset) xyplot( RE ~ Timepoint| AM * Treatment, data=dset, panel.superpose=dset$Amount, groups=Amount)
- Anova example
- help(aov), help(summary)
aovobj <- aov(RE ~ AM*Treatment, data=dset) summary(aovobj)