keep | R Documentation |
Simplifies writing and copying code to clipboard by removing the need to separately create and specify a file connection or to send code to the clipboard.
keep(x, file = NULL)
x |
Line(s) of code. |
file |
Path to write code. If not specified, code is copied to the clipboard. |
The code is copied to the clipboard or written to disk.
Matthew K. Lau
## Not run: script <- system.file( "example", "simple_script.R", package = "Rclean") clean.code <- clean(script, "tab.15") ## Copies code to your clipboard keep(clean.code) ## Saves code to your disk keep(clean.code, file = "clean_code.R") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.