# Ignore this code block. It loads mock data for CRAN.
# In your analysis, download and load your data using the
# functions `scf_download()` and `scf_load()`
td <- tempfile("corr_")
dir.create(td)
src <- system.file("extdata", "scf2022_mock_raw.rds", package = "scf")
file.copy(src, file.path(td, "scf2022.rds"), overwrite = TRUE)
scf2022 <- scf_load(2022, data_directory = td)
# EXAMPLE IMPLEMENTATION OF `scf_corr()`:
corr <- scf_corr(scf2022, ~income, ~networth)
print(corr)
summary(corr)
# Ignore the code below. It is for CRAN:
unlink(td, recursive = TRUE, force = TRUE)
Run the code above in your browser using DataLab