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

data set issues? #39

Closed rpruim closed 4 years ago

rpruim commented 6 years ago

It looks like you have some issues with data sets. Example: I see bdims in both openintro and oilabs, but it doesn't appear to be exported from oilabs.

> library(oilabs)
> head(bdims)
Error in head(bdims) : object 'bdims' not found
> data(bdims, package = "oilabs")
> head(bdims)
# A tibble: 6 x 25
  bia.di bii.di bit.di che.de che.di elb.di wri.di kne.di ank.di sho.gi che.gi wai.gi nav.gi
   <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>
1   42.9   26     31.5   17.7   28     13.1   10.4   18.8   14.1   106.   89.5   71.5   74.5
2   43.7   28.5   33.5   16.9   30.8   14     11.8   20.6   15.1   110.   97     79     86.5
3   40.1   28.2   33.3   20.9   31.7   13.9   10.9   19.7   14.1   115.   97.5   83.2   82.9
4   44.3   29.9   34     18.4   28.2   13.9   11.2   20.9   15     104.   97     77.8   78.8
5   42.5   29.9   34     21.5   29.4   15.2   11.6   20.7   14.9   108.   97.5   80     82.5
6   43.3   27     31.5   19.6   31.3   14     11.5   18.8   13.9   120.   99.9   82.5   80.1
# ... with 12 more variables: hip.gi <dbl>, thi.gi <dbl>, bic.gi <dbl>, for.gi <dbl>,
#   kne.gi <dbl>, cal.gi <dbl>, ank.gi <dbl>, wri.gi <dbl>, age <int>, wgt <dbl>, hgt <dbl>,
#   sex <fct>

I recommend putting the data in just one place and using lazy data.

nicholasjhorton commented 6 years ago

@rpruim could we talk offline with @andrewpbray and/or @mine-cetinkaya-rundel? I suspect that there are some efforts underway to reconcile these packages. (Note as well that based on my read of the R labs for open intro on the openintro.org website the package isn't needed.)

rpruim commented 6 years ago

Which package isn't needed for what?

mine-cetinkaya-rundel commented 6 years ago

The reason we're choosing to not use LazyData, despite recommendations here, is that we want students to be able to click on the dataset in their environment instead of running View() (which is a tricky function to teach when also teaching R Markdown to new learners). However there are plans for a new tibble::view() which will hopefully play nicely with R Markdown documents running on the cloud/server and if that's working well I agree that we should go back to loading data lazily.

rpruim commented 6 years ago

That seems like a bit of a hack to get around the RStudio interface rather than a genuinely good idea.

rpruim commented 6 years ago

@mine-cetinkaya-rundel, how much do you know about tibble::view()? When is it supposed to be ready and what will it do?

nicholasjhorton commented 6 years ago

I too have issues with how students use View() and would be interested in knowing more about tibble::view(). It's hard for me to understand what's planned via https://github.com/tidyverse/tibble/issues/373

krlmlr commented 6 years ago

For various reasons I think this should be a separate package. Announcing tidyview: https://krlmlr.github.io/tidyview/.

rpruim commented 6 years ago

@krlmlr , this looks very interesting. How close are you to CRAN release? Also, how will this integrate into RStudio (for clicking on data frames in the Environment tab, for example).

Looking forward to giving this a try.

rpruim commented 6 years ago

Back to @mine-cetinkaya-rundel 's reason for avoiding lazy loading data (if I understand it correclty), is there any way to get RStudio to launch tidyview::view() when clicking on a promise in the Environment tab?

krlmlr commented 6 years ago

At this point I'm back to discussing requirements: https://github.com/tidyverse/tibble/issues/373#issuecomment-402627371. CRAN release is not a big problem, but we need to agree on what we are doing in the first place. Happy to take your input there.