allisonhorst / palmerpenguins

A great intro dataset for data exploration & visualization (alternative to iris).
https://allisonhorst.github.io/palmerpenguins/
Creative Commons Zero v1.0 Universal
875 stars 206 forks source link

data(penguins_raw) not found #80

Closed vincentarelbundock closed 1 year ago

vincentarelbundock commented 3 years ago

For some reason, I can access palmerpenguins::penguins_raw, but I cannot load it with the data() function:

library(palmerpenguins)

data(penguins)
data(penguins_raw)
#> Warning in data(penguins_raw): data set 'penguins_raw' not found

When I type data(package="palmerpenguins"), I get this:

Data sets in package ‘palmerpenguins’:

penguins                               Size measurements for adult foraging penguins near Palmer Station, Antarctica
penguins_raw (penguins)                Penguin size, clutch, and blood isotope data for foraging adults near Palmer
                                       Station, Antarctica

So the problem may be related to the weird palmerpenguins_raw (penguins) string (with space) under which the dataset is catalogued.

Any ideas what might be causing this?

Thanks!

apreshill commented 3 years ago

Hmm, wonder if it is because of this: https://github.com/allisonhorst/palmerpenguins/blob/master/data/penguins.R

We did set lazy data to true (https://github.com/allisonhorst/palmerpenguins/blob/69530276d74b99df81cc385f4e95c644da69ebfa/DESCRIPTION#L25) following R Packages though, so you shouldn't need to call data() to get it- just loading library(palmerpenguins) works.

I'm actually not sure where this comes from: penguins_raw (penguins)! Any ideas? Happy to make a change if you have suggestions, although I don't think the data() call is necessary given the DESCRIPTION lazy setting.

vincentarelbundock commented 3 years ago

Not sure either about the source of this issue. You're right, I can easily access the dataset interactively by loading the package. My only (minor) issue is that I sometimes run this script to extract data from several packages programmatically using data(), and that fails. Not a big deal, but I might circle back to this issue eventually to try to figure it out.

apreshill commented 3 years ago

I don't know, but I wonder if I should parse this file: https://github.com/allisonhorst/palmerpenguins/blob/master/data/penguins.R

Into 2 separate files. I'm wondering if the (penguins) bit is extracting from the penguins.R file name there?