View source: R/download_file_linter.R
| download_file_linter | R Documentation |
mode value for downloading filesmode = "w" (the default) or mode = "a" in download.file() can generate broken files
on Windows. Instead, utils::download.file() recommends the usage of mode = "wb"
and mode = "ab".
If method = "curl" or method = "wget", no mode should be provided as it will be ignored.
download_file_linter()
best_practices, common_mistakes, robustness
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "download.file(x = my_url)",
linters = download_file_linter()
)
lint(
text = "download.file(x = my_url, mode = 'w')",
linters = download_file_linter()
)
lint(
text = "download.file(x = my_url, method = 'curl', mode = 'wb')",
linters = download_file_linter()
)
# okay
lint(
text = "download.file(x = my_url, mode = 'wb')",
linters = download_file_linter()
)
lint(
text = "download.file(x = my_url, method = 'curl')",
linters = download_file_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.