mkdCodeChunkTitledCommented-easyreporting-method: mkdCodeChunkTitledCommented

Description Usage Arguments Value Examples

Description

it creates a complete code chunk, adding a natural language comment before of it.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S4 method for signature 'easyreporting'
mkdCodeChunkTitledCommented(
  object,
  title = NULL,
  level = 1,
  commentMsg = NULL,
  codeMsg,
  optionList = getOptionsList(object),
  sourceFilesList = NULL
)

Arguments

object

an easyreporting class object

title

the title to assign to the code chunk section

level

the level of the title (default is 1)

commentMsg

a string with the natural language comment for the chunk.

codeMsg

a string within the code.

optionList

a list of options (default is the class options).

sourceFilesList

a optional list of files to source inside the chunk.

Value

none

Examples

1
2
3
4
5
6
7
rd <- easyreporting(filenamePath="./project_report",
                        title="example_report", author=c("It's me"))
optList <- makeOptionsList(includeFlag=TRUE, cacheFlag=TRUE)
mkdCodeChunkTitledCommented(rd, title="Title Example", level=1,
                commentMsg="This is the comment of the following code chunk",
                codeMsg="a <- 1\nb <- 2\n(c <- a+b)\n", optionList=optList,
                sourceFilesList=NULL)

easyreporting documentation built on Nov. 8, 2020, 8:01 p.m.