Skip to contents

This is a variation on the vcdExtra::datasets() function. Read more here: https://github.com/friendly/vcdExtra/blob/master/R/datasets.R

Usage

get_pkg_datameta(
  package,
  allClass = FALSE,
  incPackage = length(package) > 1,
  maxTitle = NULL
)

Arguments

package

name of package (a character vector)

allClass

logical (include all classes of data?)

incPackage

logical (include package name in result?)

maxTitle

maximum length of dataset title

Value

data.frame with 6 variables (dataset, title, dimensions, obs, vars, display_title)

Examples

require(tidyr)
get_pkg_datameta("tidyr")
#> # A tibble: 19 × 5
#>    package dataset                title                              obs   vars 
#>    <chr>   <chr>                  <chr>                              <chr> <chr>
#>  1 tidyr   billboard              Song rankings for Billboard top 1… 317   79   
#>  2 tidyr   cms_patient_care       Data from the Centers for Medicar… 252   5    
#>  3 tidyr   cms_patient_experience Data from the Centers for Medicar… 500   5    
#>  4 tidyr   construction           Completed construction in the US … 9     9    
#>  5 tidyr   fish_encounters        Fish encounters                    114   3    
#>  6 tidyr   household              Household data                     5     5    
#>  7 tidyr   population             World Health Organization TB data  4060  3    
#>  8 tidyr   relig_income           Pew religion and income survey     18    11   
#>  9 tidyr   smiths                 Some data about the Smith family   2     5    
#> 10 tidyr   table1                 Example tabular representations    6     4    
#> 11 tidyr   table2                 Example tabular representations    12    4    
#> 12 tidyr   table3                 Example tabular representations    6     3    
#> 13 tidyr   table4a                Example tabular representations    3     3    
#> 14 tidyr   table4b                Example tabular representations    3     3    
#> 15 tidyr   table5                 Example tabular representations    6     4    
#> 16 tidyr   us_rent_income         US rent and income data            104   5    
#> 17 tidyr   who                    World Health Organization TB data  7240  60   
#> 18 tidyr   who2                   World Health Organization TB data  7240  58   
#> 19 tidyr   world_bank_pop         Population data from the World Ba… 1064  20