ProjectMOSAIC / mosaic

Project MOSAIC R package
http://mosaic-web.org/
93 stars 26 forks source link

Example in smoothers.R throws a warning. Modify to avoid? #447

Open rpruim opened 9 years ago

rpruim commented 9 years ago

This example warns about the implicit use of age as an input to dgdeduc:

> dgdeduc <- D(g(age=age, educ=educ) ~ educ)
Warning message:
In .local(object, ...) :
  Implicit variables without default values (dangerous!):  age

It can be avoided if we set a default value for age:

> dgdeduc <- D(g(age=age, educ=educ) ~ educ, age=20)

Do we want to avoid the warning here or leave it as is?

rpruim commented 8 years ago

@dtkaplan

Take a look at this example and see what you think.