Guest User

Untitled

a guest
Jun 22nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. summarySE <- function(data=NULL, measurevar, groupvars=NULL, na.rm=FALSE,
  2. conf.interval=.95, .drop=TRUE) {
  3. require(plyr) #New version of length which can handle NA's: if na.rm==T,
  4. don't count them
  5. length2 <- function (x, na.rm=FALSE) {
  6. if (na.rm) sum(!is.na(x))
  7. else length(x)
  8. }
  9.  
  10. # This is does the summary; it's not easy to understand...
  11. datac <- ddply(data, groupvars, .drop=.drop,
  12. .fun= function(xx, col, na.rm) {
  13. c( N = length2(xx[,col], na.rm=na.rm),
  14. mean = mean (xx[,col], na.rm=na.rm),
  15. sd = sd (xx[,col], na.rm=na.rm)
  16. )
  17. },
  18. measurevar,
  19. na.rm
  20. )
  21.  
  22. qplot(temp,wl,data=cleant, facets=.~habitat, geom=c("point","smooth"), method="lm")
  23.  
  24. model <- lme(shell.size ~habitat * temp *city, random = ~1|colony, data = FL.snails)
  25.  
  26. anova(model, type = 'marginal')
  27.  
  28. 28L, 28L,....., 28L, 26L,...... 26L, 26L, 30L,...... 30L, ..........0.683, 1.283)), .Names = c("colony", "individual", "city", "habitat", "temp", "shell.size"), class = "data.frame", row.names = c(NA, -5471L))
Add Comment
Please, Sign In to add comment