Description Usage Arguments Value See Also Examples
Unzip/untar files and return the location of exit directory. This is a convenience
function (wrapper for utils::unzip()
) to make the function more
pipe-able. Additionally, the location of the unzip defaults to the directory
containing the zip file.
1 2 3 |
file |
Path to the zip file. |
loc |
The output directory location. |
... |
Other arguments passed to |
Returns the path to where the zip file was unzipped to.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## 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()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.