Skip to content

Instantly share code, notes, and snippets.

@monogenea
Created October 7, 2019 18:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save monogenea/154383b7418a8c03a7dadc77daac5961 to your computer and use it in GitHub Desktop.
# Transform the three factor variables gen, rack and nutrient
Arabidopsis[,c("gen","rack","nutrient")] <- lapply(Arabidopsis[,c("gen","rack","nutrient")], factor)
str(Arabidopsis)
# Re-attach after correction, ignore warnings
attach(Arabidopsis)
# Add 1 to total fruits, otherwise log of 0 will prompt error
total.fruits <- log(1 + total.fruits)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment