Skip to contents

Compare ranges of variables in 'many' data

Usage

compare_ranges(datacube, dataset = "all", variable)

Arguments

datacube

A datacube from one of the many packages.

dataset

A dataset in a datacube from one of the many packages. By default, "all". That is, all datasets in the datacube are used. To select two or more datasets, please declare them as a vector.

variable

Please declare a variable present in one or more datasets in the 'many' datacube. For multiple variables, please declare variable names as a vector.

Value

compare_ranges() returns a tibble with information about the minimal, maximal, average, and median values for selected variables in datacubes.

Details

compare_ranges() compares the number of observations, variables, the earliest and latest date in each dataset in a 'many' datacube.

Examples

# \donttest{
compare_ranges(emperors, variable = c("Begin", "End"))
#> # A tibble: 6 × 6
#>   Dataset    Variable Min       Max       Mean      Median   
#>   <chr>      <chr>    <chr>     <chr>     <chr>     <chr>    
#> 1 wikipedia  Begin    -26-01-16 379-01-01 227-09-27 250-08-08
#> 2 wikipedia  End      14-08-19  395-01-17 236-02-08 251-08-08
#> 3 UNRV       Begin    -27-01-01 491-12-31 280-12-18 276-07-02
#> 4 UNRV       End      -14-01-01 518-12-31 288-11-22 276-07-02
#> 5 britannica Begin    -31-01-01 475-12-31 275-04-23 276-06-16
#> 6 britannica End      14-01-01  491-12-31 283-08-09 276-09-16
# }