Conte-Ecology / conteStreamTemperature

Package for cleaning and analyzing stream daily stream temperature
MIT License
1 stars 1 forks source link

Model matrix doesn't work #17

Closed djhocking closed 10 years ago

djhocking commented 10 years ago

Model matrix doesn't work as I thought. It worked on small, simple test data but I didn't test thoroughly enough or really understand what it was doing at it's core.

Redo prepDF function using dplyr instead of model matrix and formula. The only downside to this approach is that the model covariates will have to be specified within the package rather than within a particular analysis. This is because the current version of dplyr doesn't not allow a character list or vector in the select function. That is anticipated in future versions. There may be workarounds, I'll have to look.

djhocking commented 10 years ago

dplyr can now do this which will make wrapping it in a function easier.

select_(df, .dots(name.vector))

or

select(df, one_of(name.vector))