OpenIntroStat / oilabs

🛑 This package has been deprecated and datasets and functionality have been moved to the openintro package
https://github.com/OpenIntroStat/openintro
Creative Commons Zero v1.0 Universal
10 stars 19 forks source link

lazyData = FALSE? #32

Closed beanumber closed 7 years ago

beanumber commented 8 years ago

Is there a reason why we have lazyData = FALSE in the DESCRIPTION? Hadley advises against this:

I recommend that you always include LazyData: true in your DESCRIPTION. devtools::create() does this for you.

mine-cetinkaya-rundel commented 8 years ago

The reason was so that when students run data(dataframe_name) it shows up in the environment and they can click on it, as opposed to having to type View(dataframe_name) in the console. I have tried this method before and it ends up with students putting View(dataframe_name) in their Rmd documents (I tell them to type their code there and run it from there) and then getting errors.

beanumber commented 8 years ago

Ah, I see. The downside is that they have to do data(arbuthnot) to use the data frame at all. I try to avoid using View() entirely for that same reason.

mine-cetinkaya-rundel commented 8 years ago

Agreed, having to use data(arbuthnot) not ideal. But if there is one positive I can think of, it makes the "data loading" deliberate, so when they're doing projects even though they'll use a different command (like read.csv() or sth), they at least know they need to do something to load the data.