Description Usage Arguments Value Examples
This function will help us rewriting the system calls in a better way.
1 | log1starg(f, filename = "log1starg.txt")
|
f |
The function to be called. |
filename |
The log file (default = 'log1starg.txt'). |
Void. The argument is written to the desired file.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
Imagine you want to log the first argument of the call:
paste("Hi", "there!") # i.e.: you want to log "Hi"
you can do it by:
log1starg(paste)("Hi", "there")
This will be particularly useful in the structures:
system(paste0("text", par, "text", par, ...), intern = TRUE, ignore.stderr = TRUE)
By substituting system by log1starg(system) all the console commands will be
logged in a human readable format.
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.