View source: R/system_file_linter.R
system_file_linter | R Documentation |
file.path()
with system.file()
system.file()
has a ...
argument which, internally, is passed to
file.path()
, so including it in user code is repetitive.
system_file_linter()
best_practices, consistency, readability
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = 'system.file(file.path("path", "to", "data"), package = "foo")',
linters = system_file_linter()
)
lint(
text = 'file.path(system.file(package = "foo"), "path", "to", "data")',
linters = system_file_linter()
)
# okay
lint(
text = 'system.file("path", "to", "data", package = "foo")',
linters = system_file_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.