Difference between revisions of "OR1Expt.R"

From Organic Design wiki
(Details)
m (~~~~ -> ~.~.~)
Line 1: Line 1:
{{perl}} {{#security: Sven,Goldfinger}}
 
 
 
# ------------------------- OR1 dataset analysis ------------------------------ #
 
# ------------------------- OR1 dataset analysis ------------------------------ #
  
Line 18: Line 16:
 
# Response = RE (relative expression)
 
# Response = RE (relative expression)
  
# 11:12, 8 May 2007 (NZST)~ Note: Sucrose control was only administered at Amount=1 11:12, 8 May 2007 (NZST)~
+
# ~.~.~ Note: Sucrose control was only administered at Amount=1 ~.~.~
  
 
# Convert names
 
# Convert names

Revision as of 23:13, 7 May 2007

  1. ------------------------- 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)

  1. ----------------------------- Dataset variables ----------------------------- #
  2. Amount = 1,2,5 mu/g ingestion/injection
  3. Timepoint = 1,2,3,4 days
  4. Treatment OR1 gene/Sucrose control
  5. AM = Administration method; feeding or injection
  6. Response = RE (relative expression)
  1. ~.~.~ Note: Sucrose control was only administered at Amount=1 ~.~.~
  1. Convert names

colnames(dset)[4:5] <- c("AM","RE")

library(lattice)

  1. Formulas
  2. y ~ x
  3. y ~ x | z
  4. y ~ x | (z * w)
  1. help(xyplot), help(panel.superpose)

xyplot( RE ~ AM, data=dset) xyplot( RE ~ Timepoint| AM * Treatment, data=dset, panel.superpose=dset$Amount, groups=Amount)

  1. Anova example
  2. help(aov), help(summary)

aovobj <- aov(RE ~ AM*Treatment, data=dset) summary(aovobj)