How can a non-imported method in a not-attached package be found by calls to functions not having it in their namespace?
I’m not sure if I correctly understand your question, but the main point is that group is character vector while data$group is factor. After attaching gmodels, the call for reorder(factor) calls gdata:::reorder.factor. so, reorder(factor(group)) calls it. In transform, the function is evaluated within the environment of the first argument, so in T2 <- transform(data, group … Read more