if (FALSE) {
# read from file list --------
# find all files
meta_files <- list.files(pattern = "xml", full.names = TRUE)
# import them via `jst_get_article`
jst_import(meta_files, out_file = "imported_metadata", .f = jst_get_article,
files_per_batch = 25000)
# do the same, but in parallel
library(future)
plan(multiprocess)
jst_import(meta_files, out_file = "imported_metadata", .f = jst_get_article,
files_per_batch = 25000)
# read from zip archive ------
# define imports
imports <- jst_define_import(article = c(jst_get_article, jst_get_authors))
# convert the files to .csv
jst_import_zip("my_archive.zip", out_file = "my_out_file",
import_spec = imports)
}
Run the code above in your browser using DataLab