I haven't seen all of your code, but are you using get to obtain the object yourself? If so, that is likely your problem, as that is (roughly) equivalent to typing the name at the prompt, it won't see unexported functions. It shouldn't be necessary to do, though.
contrasts = switch(ctr, "contr.none" = contr.none(<stuff>), "contr.some" = contr.some(<stuff>), default = stop("unrecognized contrast function") ) or something similar is much more legible, and thus maintainable, anyway. Non-standard lookup/evaluation can be powerful, and even necessary to do certain particular things, but it's a very large and highly specialized hammer that is usually more trouble than it is worth. Many things people are tempted to do with it don't really require it at all, and in fact are easier without it. HTH, ~G [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel