Open timcdlucas opened 7 years ago
Bugger. Doing this in InteractiveMap and other output modules should do it:
df[, c('lon', 'lat')]
If we're going to rely on module writers to do this, we could provide accessor functions and suggest they be used. Similarly, worth adding one to get the covariate values using the covCols attribute since that's used a lot and is non-obvious.
Also worth adding a lat/lon covariates module in the module tests used by BuildModule, to catch this early.
Yup agree on all. Though it'd be
df[, c('longitude', 'latitude')]
Possibly a more general test could be a workflow that creates random covariates with awkward names.
This breaks when columns are added with names that make df$lon ambiguous.
My current test module for example
This breaks because my column names
longitudecov
andlatitudecov
conflict.Not sure if other modules have this same issue. For now I'll just capitlise them I think... might try to go back and fix modules sometime.