Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makeWeightsDT: avoid column name conflicts #88

Open
WetRobot opened this issue Mar 31, 2016 · 0 comments
Open

makeWeightsDT: avoid column name conflicts #88

WetRobot opened this issue Mar 31, 2016 · 0 comments
Assignees
Milestone

Comments

@WetRobot
Copy link
Collaborator

With bad luck, the names of e.g. values may coincide with the names of print variables. E.g. a Swede uses "obs" as a printing variable name (meaning "note"), and a value variable is named internally "obs".

> dt <- makeWeightsDT(ag2, print = quote(list(obs = sex, fot)), adjust = as, 
+                     values = list(quote(list(pyrs, obs = at.risk))), weights = ws,
+                     custom.levels = list(fot = fb))
Error in makeWeightsDT(ag2, print = quote(list(obs = sex, fot)), adjust = as,  : 
  Following column names duplicated (columns created by arguments print, adjust, etc.): 'obs'. 
If you see this, please ensure you are not passing e.g. the same column to both for adjusting 
and stratification (printing).

On the other hand it may be altogether bad practice to pass values with fixed names.

@WetRobot WetRobot self-assigned this Mar 31, 2016
@WetRobot WetRobot added this to the V. 0.4.0 milestone Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant