Say we have a dataset package like palmerpenguins, What R function can we use in order to show the names of the sub-datasets which are inside this package? Thanks!
CodePudding user response:
You can use the function datasets()
from package vcdExtra
, which given a package name gives the name, dimension, and a bit of information about the datasets in that package.
vcdExtra::datasets("palmerpenguins")
#> Loading package: palmerpenguins
#> Item class dim
#> 1 penguins data.frame 344x8
#> 2 penguins_raw (penguins) data.frame 344x17
#> Title
#> 1 Size measurements for adult foraging penguins near Palmer Station, Antarctica
#> 2 Penguin size, clutch, and blood isotope data for foraging adults near Palmer Station, Antarctica
Created on 2022-08-14 by the reprex package (v2.0.1)
CodePudding user response:
- We can use
data(package = "palmerpenguins")[["results"]][,"Item"]