log1starg: Logs the first argument passed to a function with minimal...

Description Usage Arguments Value Examples

View source: R/wrappers.R

Description

This function will help us rewriting the system calls in a better way.

Usage

1
log1starg(f, filename = "log1starg.txt")

Arguments

f

The function to be called.

filename

The log file (default = 'log1starg.txt').

Value

Void. The argument is written to the desired file.

Examples

 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)

RETURN-project/makeDataCube documentation built on Feb. 11, 2022, 3:04 p.m.