Search code examples
rfunctionstandardslintlintr

How to export lintr output to a file?


I am writing some scripts in R and our standard is use lintr for standardization of the code. Please advice how can I export the output of the lint function to a txt file for example. Thanks in advance!


Solution

  • You can use the capture.output() function:

    capture.output(lint("myscript.R"), file="lint_output.txt)