Skip to content

Commit ca69943

Browse files
authored
options to download files
1 parent 9d968dc commit ca69943

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

WebTechnologies.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ or
127127

128128
Many base and CRAN packages provide functions that download files:
129129

130-
- [utils](https://stat.ethz.ch/R-manual/R-devel/library/utils/html/00Index.html)'s `download.file()`.
131-
- `r pkg("curl")`'s `curl_download()`, and `curl_fetch_multi()`, and friends.
132-
- An alternative is to use `httr::GET()` (or `RCurl::getURL()`) to first read
133-
the file into R as a character vector before parsing with a function like `utils::read.table(text = ...)`.
130+
- [utils](https://stat.ethz.ch/R-manual/R-devel/library/utils/html/00Index.html): `download.file()`.
131+
- `r pkg("curl")`: `curl_download()`, `curl_fetch_multi()`, and friends.
132+
- `r pkg("httr2")`: `req_perform(path = <your_file_path>)`, or alternatively `req_perform()` piped to `resp_body_string()`
133+
- `r pkg("httr")`: `GET()`
134+
- `r pkg("RCurl")`: `getURL()`
134135

135136
### Parsing Structured Web Data
136137

0 commit comments

Comments
 (0)