-
Notifications
You must be signed in to change notification settings - Fork 0
Reading used address file method #8
Copy link
Copy link
Open
Description
Alternatives to this process (NOTE: It looks like process has changed slightly since I wrote the alternative methods, so they might not work exactly as written anymore):
cssampling/scripts/02_used_addresses.R
Lines 38 to 46 in 2c98c18
| do.call(rbind, pblapply(seq_along(previous.sas.samples.path), | |
| function(x) | |
| transform( | |
| haven::read_sas(previous.sas.samples.path[x], | |
| col_select = "UDPRN"), | |
| filename = previous.sas.samples.path[x]))) %>% | |
| clean_names_modified() | |
| list_used_addresses <- c(list_used_addresses, list(prev.sas.samples)) | |
| } |
- Using
purrras used elsewhere in the project anyway:
usedaddresses <- previoussamples.path %>%
purrr::map(\(x) haven::read_sas(x, col_select = "UDPRN") %>%
mutate(survey = x), .progress = TRUE) %>%
purrr::list_rbind()- Using
furrr
future::plan(future::multisession, workers = 8)
usedaddresses <- previoussamples.path %>%
furrr::future_map_dfr(\(x) haven::read_sas(x, col_select = "UDPRN") %>%
mutate(survey = x), .progress = TRUE)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels