# NOT RUN {
if (!require("pacman")) install.packages("pacman")
pacman::p_load(tidyverse)
dl_loc <- 'http://www.cs.uic.edu/~liub/FBS/CustomerReviewData.zip' %>%
download() %>%
un_zip()
dir(dl_loc, pattern = '[Cc]ustomer')
dir(dl_loc, pattern = 'customer', full.names = TRUE)[1] %>%
dir()
dir(dl_loc, pattern = 'customer', full.names = TRUE)[1] %>%
dir(pattern = '\\.txt$', full.names = TRUE)
dir(dl_loc, pattern = 'customer', full.names = TRUE)[1] %>%
read_dir()
dir(dl_loc, pattern = 'customer', full.names = TRUE)[1] %>%
dir(pattern = '\\.txt$', full.names = TRUE) %>%
`[`(1) %>%
read_document()
# }
Run the code above in your browser using DataLab