简体   繁体   中英

How to save a list of lists in R?

I stored in a list a number of web pages I collected with rvest::read_html . Now I would like to save this big list of web pages for later use (so that I don't have to scrape the data again).

I tried saveRDS , but the resulting file is only 1kb and reading the data back results in a crash. I suspect that the dynamic nature of the object I'm trying to save gets in the way.

What would be the best way to save my data? Many thanks in advance for you help!

You can convert the text as a corpus of text and write them. The easiest is from package tm in R. Check this https://cran.r-project.org/web/packages/tm/tm.pdf for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM