chunkerize: Multiple code chunks

Description Usage Arguments Value

View source: R/chunkerize.R

Description

This function creates multiple code chunks from a function and along arguments marked with a star (*). Each of these special arguments is a list. The nth code chunk will use the nth element of each marked list (recycled if necessary) as argument.

Usage

1
2
3
chunkerize(FUN, arg.names, arg.values, type = "block", echo = FALSE,
  warning = FALSE, error = FALSE, message = TRUE, fig.width = 4,
  fig.height = 4, fig.align = "center", options = NULL)

Arguments

FUN

the function to use for the chunks.

arg.names

a character vector giving the argument names of FUN to set.

arg.values

a vector giving the values or object names to assign to each argument given with arg.names (they must match in order). Object names must be backquoted or quoted. Lists names marked with a star (e.g. "*L1" for L1) indicate their elements will be used sequentially in chunks.

type

the type of chunk to produce. Can be "block", "inline" or "none".

echo

logical indicating whether to include R source code in the result.

warning

logical indicating whether to print warnings in the result.

error

logical indicating whether to stop on errors.

message

logical indicating whether to print messages in the result.

fig.width, fig.height

numeric value setting width and height of the plots in inches.

fig.align

character string setting the alignment of the plots. Can be "left", "right" and "center".

options

a character string to specify the knitr options. This will overwrite the options set with the other arguments.

Value

a character vector of R code chunks which can be evaluated by knitr.


fkeck/rleafmap documentation built on May 14, 2017, 1:23 a.m.