From wdunlap at tibco.com  Thu Jul  6 22:20:45 2017
From: wdunlap at tibco.com (William Dunlap)
Date: Thu, 6 Jul 2017 13:20:45 -0700
Subject: [Rd] attributes on symbols
Message-ID: <CAF8bMcY0Sq9qf-24VKQe3BV+fi4KnLppbU221dXZkkS1_862vQ@mail.gmail.com>

The multcomp package has code in multcomp:::expression2coef that attaches
the 'coef' attribute to symbols.  Since there is only one symbol object in
a session with a given name, this means that this attaching has a global
effect.  Should this be quietly allowed or should there be a warning or an
error?

E.g.,

str(quote(Education))
# symbol Education
lmod <- stats::lm(Fertility ~ ., data = datasets::swiss)
glmod <- multcomp::glht(lmod, c("Agriculture=0", "Education=0"))
str(quote(Education))
# symbol Education
# - attr(*, "coef")= num 1

Bill Dunlap
TIBCO Software
wdunlap tibco.com

	[[alternative HTML version deleted]]



[Rd] attributes on symbols
William Dunlap