Why are my dplyr group_by & summarize not working properly? (name-collision with plyr)

I believe you’ve loaded plyr after dplyr, which is why you are getting an overall summary instead of a grouped summary. This is what happens with plyr loaded last. library(dplyr) library(plyr) df %>% group_by(DRUG,FED) %>% summarize(mean=mean(AUC0t, na.rm=TRUE), low = CI90lo(AUC0t), high= CI90hi(AUC0t), min=min(AUC0t, na.rm=TRUE), max=max(AUC0t,na.rm=TRUE), sd= sd(AUC0t, na.rm=TRUE)) mean low high min max sd 1 … Read more

Importing installed package from script raises “AttributeError: module has no attribute” or “ImportError: cannot import name”

This happens because your local module named requests.py shadows the installed requests module you are trying to use. The current directory is prepended to sys.path, so the local name takes precedence over the installed name. An extra debugging tip when this comes up is to look at the Traceback carefully, and realize that the name … Read more