Skip to content

Instantly share code, notes, and snippets.

@explodecomputer
Created October 14, 2015 14:00
Show Gist options
  • Save explodecomputer/0091a4b260cd34d55249 to your computer and use it in GitHub Desktop.
Save explodecomputer/0091a4b260cd34d55249 to your computer and use it in GitHub Desktop.
example for zoe
newmat <- as.data.frame(t(mat))
newmat$ALN <- rownames(newmat)
combineddata <- merge(bmi, newmat, by="ALN")
# See if they are individually associated with BMI
model <- lm(bmi ~ cpg1)
lm(bmi$fm1 ~ newmat[,1])
lm(fm1 ~ cpg1, data = combineddata)
summary(model)
# Construct a predictor
l <- letters
l1 <- letters[10:1]
index <- match(l1, l)
index
l
l[index]
l[index] == l1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment