Correlation and regression fundamentals with tidy data principles

LEARNING OBJECTIVE

Analyze the results of correlationship tests and simple regression models for many data sets at once

INTRODUCTION

This article only requires the tidymodels package.

While the tidymodels package broom is useful for summarizing the result of a single analysis in a consistent format, it is really designed for high-throughput applications, where you must combine results from multiple analyses. These could be subgroups of data, analyses using different models, bootstrap replicates, permutations, and so on. In particular, it plays well with ther nest() / unnest() function from tidyr and the map() function in purr

CORRELATION ANALYSIS

suppressMessages(library(tidymodels))

data("Orange")

Orange <- as_tibble(Orange)
Orange
## # A tibble: 35 x 3
##    Tree    age circumference
##    <ord> <dbl>         <dbl>
##  1 1       118            30
##  2 1       484            58
##  3 1       664            87
##  4 1      1004           115
##  5 1      1231           120
##  6 1      1372           142
##  7 1      1582           145
##  8 2       118            33
##  9 2       484            69
## 10 2       664           111
## # ... with 25 more rows

This contains 35 observations of three variables: Tree, age, and circumference. Tree is a factor with 5 levels describing five trees. As might be expected, age and circumference are correlated:

theme_set(theme_light())

cor(Orange$age, Orange$circumference)
## [1] 0.9135189
suppressMessages(library(ggplot2))

ggplot(Orange, aes(age, circumference, color = Tree)) + 
               geom_line()

Suppose you want to test for correlations individually within each tree. You can do this with dplyr’s group_by:

Orange %>%
               group_by(Tree) %>%
               summarize(correlation = cor(age, circumference))
## # A tibble: 5 x 2
##   Tree  correlation
##   <ord>       <dbl>
## 1 3           0.988
## 2 1           0.985
## 3 5           0.988
## 4 2           0.987
## 5 4           0.984

(Note that the correlations are much higher than the aggregated one, and also we can now see the correlation is simular across trees).

Suppose that instead of simply estimating a correlation, we want to perform a hypothesis test with cor.test():

ct <- cor.test(Orange$age, Orange$circumference)
ct
## 
##  Pearson's product-moment correlation
## 
## data:  Orange$age and Orange$circumference
## t = 12.9, df = 33, p-value = 1.931e-14
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.8342364 0.9557955
## sample estimates:
##       cor 
## 0.9135189

This test output comtains multiple values we may be interested in. Some are vectors of length 1, such as p-value and the estimate, and some are longer, such as the confidence interval. We can get this into a nicely organized tibble using the tidy() function:

tidy(ct)
## # A tibble: 1 x 8
##   estimate statistic  p.value parameter conf.low conf.high method    alternative
##      <dbl>     <dbl>    <dbl>     <int>    <dbl>     <dbl> <chr>     <chr>      
## 1    0.914      12.9 1.93e-14        33    0.834     0.956 Pearson'~ two.sided

Often, we want to perform multiple tests or fit multiple models, each on a different part of the data. In this case, we recommended a nest-map-unnest workflow. For example, suppose we want to perform correlation tests for each different tree. We start by nesting our data based on the group of interest:

nested <- 
               Orange %>%
               nest(data = c(age, circumference))

nested %>% unnest(data)
## # A tibble: 35 x 3
##    Tree    age circumference
##    <ord> <dbl>         <dbl>
##  1 1       118            30
##  2 1       484            58
##  3 1       664            87
##  4 1      1004           115
##  5 1      1231           120
##  6 1      1372           142
##  7 1      1582           145
##  8 2       118            33
##  9 2       484            69
## 10 2       664           111
## # ... with 25 more rows

Then we perform a correlation test for each nested tibble using purrr:map():

nested %>% 
               mutate(test = map(data, ~ cor.test(.x$age, .x$circumference)))
## # A tibble: 5 x 3
##   Tree  data             test   
##   <ord> <list>           <list> 
## 1 1     <tibble [7 x 2]> <htest>
## 2 2     <tibble [7 x 2]> <htest>
## 3 3     <tibble [7 x 2]> <htest>
## 4 4     <tibble [7 x 2]> <htest>
## 5 5     <tibble [7 x 2]> <htest>

This results in a list-column of S3 objects. We want to tidy each of the objects, which we can also do with map()

nested %>% 
               mutate(
                              test = map(data, ~ cor.test(.x$age, .x$circumference)),
                              tidided = map(test, tidy)
               )
## # A tibble: 5 x 4
##   Tree  data             test    tidided         
##   <ord> <list>           <list>  <list>          
## 1 1     <tibble [7 x 2]> <htest> <tibble [1 x 8]>
## 2 2     <tibble [7 x 2]> <htest> <tibble [1 x 8]>
## 3 3     <tibble [7 x 2]> <htest> <tibble [1 x 8]>
## 4 4     <tibble [7 x 2]> <htest> <tibble [1 x 8]>
## 5 5     <tibble [7 x 2]> <htest> <tibble [1 x 8]>

Finally, we want to unnest the tidied data frames so we can see the results in a flat tibble. All together, this looks like:

Orange %>% 
               nest(data = c(age, circumference)) %>%
               mutate(
                              test = map(data, ~ cor.test(.x$age, .x$circumference)),
                              tidied = map(test, tidy)
               ) %>%
               unnest(cols = tidied) %>%
               select(-data, -test)
## # A tibble: 5 x 9
##   Tree  estimate statistic   p.value parameter conf.low conf.high method        
##   <ord>    <dbl>     <dbl>     <dbl>     <int>    <dbl>     <dbl> <chr>         
## 1 1        0.985      13.0 0.0000485         5    0.901     0.998 Pearson's pro~
## 2 2        0.987      13.9 0.0000343         5    0.914     0.998 Pearson's pro~
## 3 3        0.988      14.4 0.0000290         5    0.919     0.998 Pearson's pro~
## 4 4        0.984      12.5 0.0000573         5    0.895     0.998 Pearson's pro~
## 5 5        0.988      14.1 0.0000318         5    0.916     0.998 Pearson's pro~
## # ... with 1 more variable: alternative <chr>

REGRESSION MODELS

This type of workflow becomes even more useful when appleid to regressions. Untidy output for a regression looks like:

lm_fit <- lm(age ~ circumference, data = Orange)

summary(lm_fit)
## 
## Call:
## lm(formula = age ~ circumference, data = Orange)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -317.88 -140.90  -17.20   96.54  471.16 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    16.6036    78.1406   0.212    0.833    
## circumference   7.8160     0.6059  12.900 1.93e-14 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 203.1 on 33 degrees of freedom
## Multiple R-squared:  0.8345, Adjusted R-squared:  0.8295 
## F-statistic: 166.4 on 1 and 33 DF,  p-value: 1.931e-14

When we tidy the results, we get multiple rows of output for each model:

tidy(lm_fit)
## # A tibble: 2 x 5
##   term          estimate std.error statistic  p.value
##   <chr>            <dbl>     <dbl>     <dbl>    <dbl>
## 1 (Intercept)      16.6     78.1       0.212 8.33e- 1
## 2 circumference     7.82     0.606    12.9   1.93e-14

Now we can handle multiple regressions at once using exactly the same workflow as before:

Orange %>%
               nest(data = c(-Tree)) %>% 
               mutate(
                              fit = map(data, ~ lm(age ~ circumference, data = .x)),
                              tidied = map(fit, tidy)
               ) %>% 
               unnest(tidied) %>% 
               select(-data, -fit)
## # A tibble: 10 x 6
##    Tree  term          estimate std.error statistic   p.value
##    <ord> <chr>            <dbl>     <dbl>     <dbl>     <dbl>
##  1 1     (Intercept)    -265.      98.6      -2.68  0.0436   
##  2 1     circumference    11.9      0.919    13.0   0.0000485
##  3 2     (Intercept)    -132.      83.1      -1.59  0.172    
##  4 2     circumference     7.80     0.560    13.9   0.0000343
##  5 3     (Intercept)    -210.      85.3      -2.46  0.0574   
##  6 3     circumference    12.0      0.835    14.4   0.0000290
##  7 4     (Intercept)     -76.5     88.3      -0.867 0.426    
##  8 4     circumference     7.17     0.572    12.5   0.0000573
##  9 5     (Intercept)     -54.5     76.9      -0.709 0.510    
## 10 5     circumference     8.79     0.621    14.1   0.0000318

You can just as easily use multiple predictors in the regressions, as shown here on the mtcars dataset. We nest the data into automatic vs manual cars (the am column), then perform the regression within each nested tibble.

data(mtcars)

mtcars %>% as_tibble(mtcars)
## # A tibble: 32 x 11
##      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
##    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
##  1  21       6  160    110  3.9   2.62  16.5     0     1     4     4
##  2  21       6  160    110  3.9   2.88  17.0     0     1     4     4
##  3  22.8     4  108     93  3.85  2.32  18.6     1     1     4     1
##  4  21.4     6  258    110  3.08  3.22  19.4     1     0     3     1
##  5  18.7     8  360    175  3.15  3.44  17.0     0     0     3     2
##  6  18.1     6  225    105  2.76  3.46  20.2     1     0     3     1
##  7  14.3     8  360    245  3.21  3.57  15.8     0     0     3     4
##  8  24.4     4  147.    62  3.69  3.19  20       1     0     4     2
##  9  22.8     4  141.    95  3.92  3.15  22.9     1     0     4     2
## 10  19.2     6  168.   123  3.92  3.44  18.3     1     0     4     4
## # ... with 22 more rows
mtcars
##                      mpg cyl  disp  hp drat    wt  qsec vs am gear carb
## Mazda RX4           21.0   6 160.0 110 3.90 2.620 16.46  0  1    4    4
## Mazda RX4 Wag       21.0   6 160.0 110 3.90 2.875 17.02  0  1    4    4
## Datsun 710          22.8   4 108.0  93 3.85 2.320 18.61  1  1    4    1
## Hornet 4 Drive      21.4   6 258.0 110 3.08 3.215 19.44  1  0    3    1
## Hornet Sportabout   18.7   8 360.0 175 3.15 3.440 17.02  0  0    3    2
## Valiant             18.1   6 225.0 105 2.76 3.460 20.22  1  0    3    1
## Duster 360          14.3   8 360.0 245 3.21 3.570 15.84  0  0    3    4
## Merc 240D           24.4   4 146.7  62 3.69 3.190 20.00  1  0    4    2
## Merc 230            22.8   4 140.8  95 3.92 3.150 22.90  1  0    4    2
## Merc 280            19.2   6 167.6 123 3.92 3.440 18.30  1  0    4    4
## Merc 280C           17.8   6 167.6 123 3.92 3.440 18.90  1  0    4    4
## Merc 450SE          16.4   8 275.8 180 3.07 4.070 17.40  0  0    3    3
## Merc 450SL          17.3   8 275.8 180 3.07 3.730 17.60  0  0    3    3
## Merc 450SLC         15.2   8 275.8 180 3.07 3.780 18.00  0  0    3    3
## Cadillac Fleetwood  10.4   8 472.0 205 2.93 5.250 17.98  0  0    3    4
## Lincoln Continental 10.4   8 460.0 215 3.00 5.424 17.82  0  0    3    4
## Chrysler Imperial   14.7   8 440.0 230 3.23 5.345 17.42  0  0    3    4
## Fiat 128            32.4   4  78.7  66 4.08 2.200 19.47  1  1    4    1
## Honda Civic         30.4   4  75.7  52 4.93 1.615 18.52  1  1    4    2
## Toyota Corolla      33.9   4  71.1  65 4.22 1.835 19.90  1  1    4    1
## Toyota Corona       21.5   4 120.1  97 3.70 2.465 20.01  1  0    3    1
## Dodge Challenger    15.5   8 318.0 150 2.76 3.520 16.87  0  0    3    2
## AMC Javelin         15.2   8 304.0 150 3.15 3.435 17.30  0  0    3    2
## Camaro Z28          13.3   8 350.0 245 3.73 3.840 15.41  0  0    3    4
## Pontiac Firebird    19.2   8 400.0 175 3.08 3.845 17.05  0  0    3    2
## Fiat X1-9           27.3   4  79.0  66 4.08 1.935 18.90  1  1    4    1
## Porsche 914-2       26.0   4 120.3  91 4.43 2.140 16.70  0  1    5    2
## Lotus Europa        30.4   4  95.1 113 3.77 1.513 16.90  1  1    5    2
## Ford Pantera L      15.8   8 351.0 264 4.22 3.170 14.50  0  1    5    4
## Ferrari Dino        19.7   6 145.0 175 3.62 2.770 15.50  0  1    5    6
## Maserati Bora       15.0   8 301.0 335 3.54 3.570 14.60  0  1    5    8
## Volvo 142E          21.4   4 121.0 109 4.11 2.780 18.60  1  1    4    2
mtcars %>% 
               nest(data = -c(am)) %>%
               mutate(
                              fit = map(data, ~ lm (wt ~ mpg + qsec + gear, data = .x)),
                              tidied = map(fit, tidy)
               ) %>% 
               unnest(tidied) %>% 
               select(-data, -fit)
## # A tibble: 8 x 6
##      am term        estimate std.error statistic  p.value
##   <dbl> <chr>          <dbl>     <dbl>     <dbl>    <dbl>
## 1     1 (Intercept)   4.28      3.46      1.24   0.247   
## 2     1 mpg          -0.101     0.0294   -3.43   0.00750 
## 3     1 qsec          0.0398    0.151     0.264  0.798   
## 4     1 gear         -0.0229    0.349    -0.0656 0.949   
## 5     0 (Intercept)   4.92      1.40      3.52   0.00309 
## 6     0 mpg          -0.192     0.0443   -4.33   0.000591
## 7     0 qsec          0.0919    0.0983    0.935  0.365   
## 8     0 gear          0.147     0.368     0.398  0.696

What if you want not just the tidy() output, but the augment() and glance() outputs as well, while still performing each regression only once? Since we’re using list-columns, we can just fit the model once and use multiple list-columns to store the tidied, glanced and augmented outputs.

regressions <- 
               mtcars %>% 
               nest(data = c(-am)) %>% 
               mutate(
                              fit = map(data, ~lm(wt ~ mpg + qsec + gear, data = .x)),
                              tidied = map(fit, tidy),
                              glanced = map(fit, glance),
                              augmented = map(fit, augment)
               )

regressions
## # A tibble: 2 x 6
##      am data               fit    tidied           glanced           augmented  
##   <dbl> <list>             <list> <list>           <list>            <list>     
## 1     1 <tibble [13 x 10]> <lm>   <tibble [4 x 5]> <tibble [1 x 12]> <tibble [1~
## 2     0 <tibble [19 x 10]> <lm>   <tibble [4 x 5]> <tibble [1 x 12]> <tibble [1~
regressions %>% 
               select(tidied) %>%
               unnest(tidied)
## # A tibble: 8 x 5
##   term        estimate std.error statistic  p.value
##   <chr>          <dbl>     <dbl>     <dbl>    <dbl>
## 1 (Intercept)   4.28      3.46      1.24   0.247   
## 2 mpg          -0.101     0.0294   -3.43   0.00750 
## 3 qsec          0.0398    0.151     0.264  0.798   
## 4 gear         -0.0229    0.349    -0.0656 0.949   
## 5 (Intercept)   4.92      1.40      3.52   0.00309 
## 6 mpg          -0.192     0.0443   -4.33   0.000591
## 7 qsec          0.0919    0.0983    0.935  0.365   
## 8 gear          0.147     0.368     0.398  0.696
regressions %>% 
               select(glanced) %>% 
               unnest(glanced)
## # A tibble: 2 x 12
##   r.squared adj.r.squared sigma statistic  p.value    df    logLik   AIC   BIC
##       <dbl>         <dbl> <dbl>     <dbl>    <dbl> <dbl>     <dbl> <dbl> <dbl>
## 1     0.833         0.778 0.291     15.0  0.000759     3  -0.00580  10.0  12.8
## 2     0.625         0.550 0.522      8.32 0.00170      3 -12.4      34.7  39.4
## # ... with 3 more variables: deviance <dbl>, df.residual <int>, nobs <int>
regressions %>% 
               select(augmented) %>% 
               unnest(augmented)
## # A tibble: 32 x 10
##       wt   mpg  qsec  gear .fitted  .resid  .hat .sigma  .cooksd .std.resid
##    <dbl> <dbl> <dbl> <dbl>   <dbl>   <dbl> <dbl>  <dbl>    <dbl>      <dbl>
##  1  2.62  21    16.5     4    2.73 -0.107  0.517  0.304 0.0744      -0.527 
##  2  2.88  21    17.0     4    2.75  0.126  0.273  0.304 0.0243       0.509 
##  3  2.32  22.8  18.6     4    2.63 -0.310  0.312  0.279 0.188       -1.29  
##  4  2.2   32.4  19.5     4    1.70  0.505  0.223  0.233 0.278        1.97  
##  5  1.62  30.4  18.5     4    1.86 -0.244  0.269  0.292 0.0889      -0.982 
##  6  1.84  33.9  19.9     4    1.56  0.274  0.286  0.286 0.125        1.12  
##  7  1.94  27.3  18.9     4    2.19 -0.253  0.151  0.293 0.0394      -0.942 
##  8  2.14  26    16.7     5    2.21 -0.0683 0.277  0.307 0.00732     -0.276 
##  9  1.51  30.4  16.9     5    1.77 -0.259  0.430  0.284 0.263       -1.18  
## 10  3.17  15.8  14.5     5    3.15  0.0193 0.292  0.308 0.000644     0.0789
## # ... with 22 more rows
sessioninfo::session_info()
## - Session info ---------------------------------------------------------------
##  setting  value                       
##  version  R version 4.1.1 (2021-08-10)
##  os       Windows 10 x64              
##  system   x86_64, mingw32             
##  ui       RTerm                       
##  language (EN)                        
##  collate  English_United States.1252  
##  ctype    English_United States.1252  
##  tz       Asia/Bangkok                
##  date     2022-01-11                  
## 
## - Packages -------------------------------------------------------------------
##  package      * version    date       lib
##  assertthat     0.2.1      2019-03-21 [1]
##  backports      1.2.1      2020-12-09 [1]
##  broom        * 0.7.9      2021-07-27 [1]
##  bslib          0.3.0      2021-09-02 [1]
##  class          7.3-19     2021-05-03 [1]
##  cli            3.0.1      2021-07-17 [1]
##  codetools      0.2-18     2020-11-04 [1]
##  colorspace     2.0-2      2021-06-24 [1]
##  crayon         1.4.2      2021-10-29 [1]
##  DBI            1.1.1      2021-01-15 [1]
##  dials        * 0.0.9      2020-09-16 [1]
##  DiceDesign     1.9        2021-02-13 [1]
##  digest         0.6.27     2020-10-24 [1]
##  dplyr        * 1.0.7      2021-06-18 [1]
##  ellipsis       0.3.2      2021-04-29 [1]
##  evaluate       0.14       2019-05-28 [1]
##  fansi          0.5.0      2021-05-25 [1]
##  farver         2.1.0      2021-02-28 [1]
##  fastmap        1.1.0      2021-01-25 [1]
##  foreach        1.5.1      2020-10-15 [1]
##  furrr          0.2.3      2021-06-25 [1]
##  future         1.22.1     2021-08-25 [1]
##  future.apply   1.8.1      2021-08-10 [1]
##  generics       0.1.1      2021-10-25 [1]
##  ggplot2      * 3.3.5      2021-06-25 [1]
##  globals        0.14.0     2020-11-22 [1]
##  glue           1.4.2      2020-08-27 [1]
##  gower          0.2.2      2020-06-23 [1]
##  GPfit          1.0-8      2019-02-08 [1]
##  gtable         0.3.0      2019-03-25 [1]
##  hardhat        0.1.6      2021-07-14 [1]
##  highr          0.9        2021-04-16 [1]
##  htmltools      0.5.2      2021-08-25 [1]
##  infer        * 1.0.0      2021-08-13 [1]
##  ipred          0.9-11     2021-03-12 [1]
##  iterators      1.0.13     2020-10-15 [1]
##  jquerylib      0.1.4      2021-04-26 [1]
##  jsonlite       1.7.2      2020-12-09 [1]
##  knitr          1.34       2021-09-09 [1]
##  labeling       0.4.2      2020-10-20 [1]
##  lattice        0.20-44    2021-05-02 [1]
##  lava           1.6.10     2021-09-02 [1]
##  lhs            1.1.1      2020-10-05 [1]
##  lifecycle      1.0.1      2021-09-24 [1]
##  listenv        0.8.0      2019-12-05 [1]
##  lubridate      1.7.10     2021-02-26 [1]
##  magrittr       2.0.1      2020-11-17 [1]
##  MASS           7.3-54     2021-05-03 [1]
##  Matrix         1.3-4      2021-06-01 [1]
##  modeldata    * 0.1.1      2021-07-14 [1]
##  munsell        0.5.0      2018-06-12 [1]
##  nnet           7.3-16     2021-05-03 [1]
##  parallelly     1.28.1     2021-09-09 [1]
##  parsnip      * 0.1.7      2021-07-21 [1]
##  pillar         1.6.4      2021-10-18 [1]
##  pkgconfig      2.0.3      2019-09-22 [1]
##  plyr           1.8.6      2020-03-03 [1]
##  pROC           1.18.0     2021-09-03 [1]
##  prodlim        2019.11.13 2019-11-17 [1]
##  purrr        * 0.3.4      2020-04-17 [1]
##  R6             2.5.1      2021-08-19 [1]
##  Rcpp           1.0.7      2021-07-07 [1]
##  recipes      * 0.1.16     2021-04-16 [1]
##  rlang          0.4.11     2021-04-30 [1]
##  rmarkdown      2.11       2021-09-14 [1]
##  rpart          4.1-15     2019-04-12 [1]
##  rsample      * 0.1.0      2021-05-08 [1]
##  rstudioapi     0.13       2020-11-12 [1]
##  sass           0.4.0      2021-05-12 [1]
##  scales       * 1.1.1.9000 2021-09-04 [1]
##  sessioninfo    1.1.1      2018-11-05 [1]
##  stringi        1.7.4      2021-08-25 [1]
##  stringr        1.4.0      2019-02-10 [1]
##  survival       3.2-11     2021-04-26 [1]
##  tibble       * 3.1.4      2021-08-25 [1]
##  tidymodels   * 0.1.3.9000 2021-09-04 [1]
##  tidyr        * 1.1.3      2021-03-03 [1]
##  tidyselect     1.1.1      2021-04-30 [1]
##  timeDate       3043.102   2018-02-21 [1]
##  tune         * 0.1.6      2021-07-21 [1]
##  utf8           1.2.2      2021-07-24 [1]
##  vctrs          0.3.8      2021-04-29 [1]
##  viridisLite    0.4.0      2021-04-13 [1]
##  withr          2.4.2      2021-04-18 [1]
##  workflows    * 0.2.3      2021-07-16 [1]
##  workflowsets * 0.1.0      2021-07-22 [1]
##  xfun           0.25       2021-08-06 [1]
##  yaml           2.2.1      2020-02-01 [1]
##  yardstick    * 0.0.8      2021-03-28 [1]
##  source                                
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.2)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.2)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.2)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.2)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  Github (r-lib/scales@9c5a00d)         
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  Github (tidymodels/tidymodels@b653caa)
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.1)                        
##  CRAN (R 4.1.0)                        
##  CRAN (R 4.1.1)                        
## 
## [1] D:/R/R-4.1.1/library