Title: | Helps creating report for improving Reproducible Computational Research |
---|---|
Description: | An S4 class for facilitating the automated creation of rmarkdown files inside other packages/software even without knowing rmarkdown language. Best if implemented in functions as "recursive" style programming. |
Authors: | Dario Righelli [cre, aut] |
Maintainer: | Dario Righelli <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.19.0 |
Built: | 2024-10-31 15:34:11 UTC |
Source: | https://github.com/bioc/easyreporting |
addResource
addResource(object, source, reference, description)
addResource(object, source, reference, description)
object |
an easyreporting class instance |
source |
a string indicating the reference (i.e. "GEO") |
reference |
a string indicanting the reference of the source (i.e. "GSE60231) |
description |
a natural language description |
an easyreporting class instance
rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) rd <- addResource(rd, source="GEO", "GSE60231", "Transcriptome of BMDC to different antigen delivery systems") ## Not run: compile(rd) ## End(Not run)
rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) rd <- addResource(rd, source="GEO", "GSE60231", "Transcriptome of BMDC to different antigen delivery systems") ## Not run: compile(rd) ## End(Not run)
addResource
## S4 method for signature 'easyreporting' addResource(object, source, reference, description)
## S4 method for signature 'easyreporting' addResource(object, source, reference, description)
object |
an easyreporting class instance |
source |
a string indicating the reference (i.e. "GEO") |
reference |
a string indicanting the reference of the source (i.e. "GSE60231) |
description |
a natural language description |
an easyreporting class instance
rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) rd <- addResource(rd, source="GEO", "GSE60231", "Transcriptome of BMDC to different antigen delivery systems") ## Not run: compile(rd) ## End(Not run)
rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) rd <- addResource(rd, source="GEO", "GSE60231", "Transcriptome of BMDC to different antigen delivery systems") ## Not run: compile(rd) ## End(Not run)
prints the sessionInfo and compiles the produced rmarkdown file into an HTML report.
compile(object)
compile(object)
object |
an easyreporting class object |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) compile(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) compile(rd) ## End(Not run)
prints the sessionInfo and compiles the rmarkdown file
## S4 method for signature 'easyreporting' compile(object)
## S4 method for signature 'easyreporting' compile(object)
object |
an easyreporting class object |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) compile(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) compile(rd) ## End(Not run)
An S4 class for managing rmarkdown report. Each instance describes an rmarkdown file.
easyreporting( filenamePath, title, author, optionList = NULL, documentType = "rmarkdown::html_document", bibfile = "" ) easyreporting( filenamePath, title, author, optionList = NULL, documentType = "rmarkdown::html_document", bibfile = "" )
easyreporting( filenamePath, title, author, optionList = NULL, documentType = "rmarkdown::html_document", bibfile = "" ) easyreporting( filenamePath, title, author, optionList = NULL, documentType = "rmarkdown::html_document", bibfile = "" )
filenamePath |
the path with the name of the rmarkdown. |
title |
the title of the report section. |
author |
the author(s) of the report. |
optionList |
a list of options for the general rmarkdown document. |
documentType |
type of report final document, if author(s) is a |
bibfile |
a bibfile for bibliography. |
an S4 easyreporting class instance
filenamePath
the path with the name of the rmarkdown.
title
the title of the report section.
author
the author(s) of the report.
type
of report final document, if author(s) is a person
it will be distill::distill_article
(rmarkdown::html_document
default)
bibfile
a bibfile for bibliography.
optionList
a list of options for the general rmarkdown document.
rd <- easyreporting(filenamePath="./project_report", title="example_report", author="It's me")
rd <- easyreporting(filenamePath="./project_report", title="example_report", author="It's me")
executes a Shiny GUI to perform a volcano plot and trace its executed functions.
erGUIVolcano()
erGUIVolcano()
none
## Not run: erGUIVolcano() ## End(Not run)
## Not run: erGUIVolcano() ## End(Not run)
returns the bibfile name attached to the object
getBibliography(object)
getBibliography(object)
object |
an easyreporting class object |
none
## Not run: TBD ## End(Not run)
## Not run: TBD ## End(Not run)
returns the bibfile name attached to the object
## S4 method for signature 'easyreporting' getBibliography(object)
## S4 method for signature 'easyreporting' getBibliography(object)
object |
an easyreporting class object |
none
example(easyreporting) getBibliography(rd)
example(easyreporting) getBibliography(rd)
returns the optionList from the easyreporting class (see the makeOptionList function for more details).
getOptionsList(object)
getOptionsList(object)
object |
an easyreporting class object |
a list of options
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- getOptionsList(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- getOptionsList(rd) ## End(Not run)
returns the optionList from the easyreporting class
## S4 method for signature 'easyreporting' getOptionsList(object)
## S4 method for signature 'easyreporting' getOptionsList(object)
object |
an easyreporting class object |
a list of options
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- getOptionsList(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- getOptionsList(rd) ## End(Not run)
returns the filename with its path of the report generated by easyreporting
getReportFilename(object)
getReportFilename(object)
object |
an easyreporting class object |
a string of report file name with path
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) (rep <- getReportFilename(rd)) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) (rep <- getReportFilename(rd)) ## End(Not run)
returns the report filename with path
## S4 method for signature 'easyreporting' getReportFilename(object)
## S4 method for signature 'easyreporting' getReportFilename(object)
object |
an easyreporting class object |
a string of report file name with path
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) (rep <- getReportFilename(rd)) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) (rep <- getReportFilename(rd)) ## End(Not run)
makes an list of rmarkdown options
makeOptionsList( cacheFlag = TRUE, evalFlag = TRUE, echoFlag = TRUE, warningFlag = FALSE, showMessages = FALSE, includeFlag = TRUE, collapseFlag = FALSE, purlFlag = TRUE, errorFlag = TRUE, messageFlag = TRUE, highlightFlag = TRUE, promptFlag = FALSE, stripWhiteFlag = TRUE, tidyFlag = FALSE )
makeOptionsList( cacheFlag = TRUE, evalFlag = TRUE, echoFlag = TRUE, warningFlag = FALSE, showMessages = FALSE, includeFlag = TRUE, collapseFlag = FALSE, purlFlag = TRUE, errorFlag = TRUE, messageFlag = TRUE, highlightFlag = TRUE, promptFlag = FALSE, stripWhiteFlag = TRUE, tidyFlag = FALSE )
cacheFlag |
boolean for caching chunk data (default TRUE) |
evalFlag |
boolean for evaluating the code chunk in the compiled version (default TRUE) |
echoFlag |
boolean for showing the code chunk (default TRUE) |
warningFlag |
boolean for showing the chunk warnings (default FALSE) |
showMessages |
boolean for showing the chunk warnings in compiled version (default FALSE) |
includeFlag |
boolean for including the code chunk in the compiled version (default TRUE) |
collapseFlag |
boolean for collapsing the code chunk in the compiled version (default FALSE), |
purlFlag |
boolean for extracting the code chunk as R code in a separate R file (default TRUE), |
errorFlag |
boolean for including the error generated by the code chunk in the compiled version (default TRUE), |
messageFlag |
boolean for including the code chunk messages in the compiled version (default TRUE), |
highlightFlag |
boolean for highlinghtinh the code chunk in the compiled version (default TRUE), |
promptFlag |
boolean for including a ">" for the code chunk in the compiled version (default FALSE), |
stripWhiteFlag |
boolean for removing the white spaces at beginning/end of the code chunk in the compiled version (default TRUE), |
tidyFlag |
boolean for creating a tidy code chunk in the compiled version (default FALSE). |
list of rmarkdown options
optList <- makeOptionsList()
optList <- makeOptionsList()
it creates a complete code chunk, adding a natural language comment before of it.
mkdCodeChunkCommented( object, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
mkdCodeChunkCommented( object, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
object |
an easyreporting class object |
comment |
a string with the natural language comment for the chunk. |
code |
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. |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- makeOptionsList(includeFlag=TRUE, cacheFlag=TRUE) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n (c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- makeOptionsList(includeFlag=TRUE, cacheFlag=TRUE) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n (c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
it creates a complete code chunk, adding a natural language comment before of it.
## S4 method for signature 'easyreporting' mkdCodeChunkCommented( object, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
## S4 method for signature 'easyreporting' mkdCodeChunkCommented( object, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
object |
an easyreporting class object |
comment |
a string with the natural language comment for the chunk. |
code |
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. |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- makeOptionsList(includeFlag=TRUE, cacheFlag=TRUE) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code=c(quote(a <- 1), quote(b <- 2), quote(c <- a+b)), optionList=optList, sourceFilesList=NULL) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n(c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- makeOptionsList(includeFlag=TRUE, cacheFlag=TRUE) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code=c(quote(a <- 1), quote(b <- 2), quote(c <- a+b)), optionList=optList, sourceFilesList=NULL) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n(c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
it creates a complete code chunk.
mkdCodeChunkComplete( object, code, optionList = getOptionsList(object), sourceFilesList = NULL )
mkdCodeChunkComplete( object, code, optionList = getOptionsList(object), sourceFilesList = NULL )
object |
an easyreporting class object |
code |
a string or an expression generated with quote containing a function call or the entire code chunk to trace. |
optionList |
a list of options. |
sourceFilesList |
a list of files to source. |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkComplete(rd, code="a <- 1\n b <- 2\n c <- a+b\n print(c)") ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkComplete(rd, code="a <- 1\n b <- 2\n c <- a+b\n print(c)") ## End(Not run)
it creates a complete code chunk.
## S4 method for signature 'easyreporting' mkdCodeChunkComplete( object, code, optionList = getOptionsList(object), sourceFilesList = NULL )
## S4 method for signature 'easyreporting' mkdCodeChunkComplete( object, code, optionList = getOptionsList(object), sourceFilesList = NULL )
object |
an easyreporting class object |
code |
a string or an expression (or a list of expressions) generated with quote containing a function call or the entire code chunk to trace. |
optionList |
a list of options. |
sourceFilesList |
a list of files to source. |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkComplete(rd, code=c(quote(a <- 1), quote(b <- 2), quote(c<- a+b), quote(print(c)))) mkdCodeChunkComplete(rd, code="a <- 1\n b <- 2\n c <- a+b\n print(c)") ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkComplete(rd, code=c(quote(a <- 1), quote(b <- 2), quote(c<- a+b), quote(print(c)))) mkdCodeChunkComplete(rd, code="a <- 1\n b <- 2\n c <- a+b\n print(c)") ## End(Not run)
it creates a code chunk end. Always use it after a mkdCodeChunkSt()
mkdCodeChunkEnd(object)
mkdCodeChunkEnd(object)
object |
an easyreporting class object |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
it creates a code chunk end. Always use it after a mkdCodeChunkSt()
## S4 method for signature 'easyreporting' mkdCodeChunkEnd(object)
## S4 method for signature 'easyreporting' mkdCodeChunkEnd(object)
object |
an easyreporting class object |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
it creates a code chunk start. A list of options and files to source for the chunk can optionally be passed to the function.
mkdCodeChunkSt( object, optionList = getOptionsList(object), sourceFilesList = NULL, isComplete = FALSE )
mkdCodeChunkSt( object, optionList = getOptionsList(object), sourceFilesList = NULL, isComplete = FALSE )
object |
an easyreporting class object |
optionList |
a list of options |
sourceFilesList |
a list of files that can be sourced inside the code chunk. |
isComplete |
a flag determining if the chunk is already a complete chunk |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## no options mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## setting options optList <- makeOptionsList(includeFlag=TRUE) mkdCodeChunkSt(rd, optionList=optList) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## no options mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## setting options optList <- makeOptionsList(includeFlag=TRUE) mkdCodeChunkSt(rd, optionList=optList) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
it creates a code chunk start. A list of options and files to source for the chunk can optionally be passed to the function.
## S4 method for signature 'easyreporting' mkdCodeChunkSt( object, optionList = getOptionsList(object), sourceFilesList = NULL, isComplete = FALSE )
## S4 method for signature 'easyreporting' mkdCodeChunkSt( object, optionList = getOptionsList(object), sourceFilesList = NULL, isComplete = FALSE )
object |
an easyreporting class object |
optionList |
a list of options |
sourceFilesList |
a list of files that can be sourced inside the code chunk. |
isComplete |
a flag determining if the chunk is already a complete chunk |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## no options mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## setting options optList <- makeOptionsList(includeFlag=TRUE) mkdCodeChunkSt(rd, optionList=optList) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## no options mkdCodeChunkSt(rd) ## just leaving empty mkdCodeChunkEnd(rd) ## setting options optList <- makeOptionsList(includeFlag=TRUE) mkdCodeChunkSt(rd, optionList=optList) ## just leaving empty mkdCodeChunkEnd(rd) ## End(Not run)
it creates a complete code chunk, adding a natural language comment before of it.
mkdCodeChunkTitledCommented( object, title = NULL, level = 1, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
mkdCodeChunkTitledCommented( object, title = NULL, level = 1, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
object |
an easyreporting class object |
title |
the title to assign to the code chunk section |
level |
the level of the title (default is 1) |
comment |
a string with the natural language comment for the chunk. |
code |
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. |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- makeOptionsList(includeFlag=TRUE, cacheFlag=TRUE) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n (c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) optList <- makeOptionsList(includeFlag=TRUE, cacheFlag=TRUE) mkdCodeChunkCommented(rd, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n (c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
it creates a complete code chunk, adding a natural language comment before of it.
## S4 method for signature 'easyreporting' mkdCodeChunkTitledCommented( object, title = NULL, level = 1, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
## S4 method for signature 'easyreporting' mkdCodeChunkTitledCommented( object, title = NULL, level = 1, comment = NULL, code, optionList = getOptionsList(object), sourceFilesList = NULL )
object |
an easyreporting class object |
title |
the title to assign to the code chunk section |
level |
the level of the title (default is 1) |
comment |
a string with the natural language comment for the chunk. |
code |
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. |
none
## Not run: 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, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n(c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
## Not run: 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, comment="This is the comment of the following code chunk", code="a <- 1\n b <- 2\n(c <- a+b)\n", optionList=optList, sourceFilesList=NULL) ## End(Not run)
It appends a general message to the report, useful for describing a code chunk or a part of the report. Useful for adding natural language comments.
mkdGeneralMsg(object, message)
mkdGeneralMsg(object, message)
object |
an easyreporting class object |
message |
the message to append to the report |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralMsg(rd, message="Writing a paragraph to describe my code chunk") ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralMsg(rd, message="Writing a paragraph to describe my code chunk") ## End(Not run)
It appends a general message to the report. Useful for adding natural language comments.
## S4 method for signature 'easyreporting' mkdGeneralMsg(object, message)
## S4 method for signature 'easyreporting' mkdGeneralMsg(object, message)
object |
an easyreporting class object |
message |
the message to append to the report |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralMsg(rd, "Writing a paragraph to describe my code chunk") ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralMsg(rd, "Writing a paragraph to describe my code chunk") ## End(Not run)
It appends a a titled section followed by a general message to the report. Useful for adding natural language comments.
mkdGeneralTitledMsg(object, title = NULL, level = 1, message)
mkdGeneralTitledMsg(object, title = NULL, level = 1, message)
object |
an easyreporting class object |
title |
the title of the report section. |
level |
the level (1 to 6) of the title (default is 1) |
message |
the message to append to the report |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralTitledMsg(rd, title="Generic SubTitle for this message", level=2, message="Writing a paragraph to describe my code chunk") ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralTitledMsg(rd, title="Generic SubTitle for this message", level=2, message="Writing a paragraph to describe my code chunk") ## End(Not run)
It appends a a titled section followed by a general message to the report. Useful for adding natural language comments.
## S4 method for signature 'easyreporting' mkdGeneralTitledMsg(object, title = NULL, level = 1, message)
## S4 method for signature 'easyreporting' mkdGeneralTitledMsg(object, title = NULL, level = 1, message)
object |
an easyreporting class object |
title |
the optional title to give to the message section |
level |
the level (1 to 6) of the title (default is 1) |
message |
the message to append to the report |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralTitledMsg(rd, title="Generic SubTitle for this message", level=2, message="Writing a paragraph to describe my code chunk") ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdGeneralTitledMsg(rd, title="Generic SubTitle for this message", level=2, message="Writing a paragraph to describe my code chunk") ## End(Not run)
Inserts an rmarkdown title inside the report, useful for create distinct sections inside the final resport.
mkdTitle(object, title, level = 1)
mkdTitle(object, title, level = 1)
object |
an easyreporting class object |
title |
a string within the title. |
level |
a numeric from 1 to 6 (default is 1). |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdTitle(rd, "First Level Title") mkdTitle(rd, "Sub-Title", level=2) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdTitle(rd, "First Level Title") mkdTitle(rd, "Sub-Title", level=2) ## End(Not run)
Inserts an rmarkdown title inside the report.
## S4 method for signature 'easyreporting' mkdTitle(object, title, level = 1)
## S4 method for signature 'easyreporting' mkdTitle(object, title, level = 1)
object |
an easyreporting class object |
title |
a string within the title. |
level |
a numeric from 1 to 6 (default is 1). |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdTitle(rd, "First Level Title") mkdTitle(rd, "Sub-Title", level=2) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) mkdTitle(rd, "First Level Title") mkdTitle(rd, "Sub-Title", level=2) ## End(Not run)
it includes a variable assignment in the report. NB: a call to the "mkdCodeChunkSt" has to be done before using it.
mkdVariableAssignment(object, variable.name, variable.object.name, show)
mkdVariableAssignment(object, variable.name, variable.object.name, show)
object |
an easyreporting class object |
variable.name |
a string indicating the name of the variabe to store in the report. (This can be changed here, but further uses of the variable needs to take into account the variable name change). |
variable.object.name |
the name of the already existing variable. (This cannot be canged.) |
show |
a boolean indicating if to show the message before writing it into the rmardown file. |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## leaving the default options to the code chunk mkdCodeChunkSt(rd) ## adding a variable assignement variable <- 1 mkdVariableAssignment(rd, "variable", "variable", show=TRUE) mkdCodeChunkEnd(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## leaving the default options to the code chunk mkdCodeChunkSt(rd) ## adding a variable assignement variable <- 1 mkdVariableAssignment(rd, "variable", "variable", show=TRUE) mkdCodeChunkEnd(rd) ## End(Not run)
it includes a variable assignment in the report. NB: a call to the "mkdCodeChunkSt" has to be done before using it.
## S4 method for signature 'easyreporting' mkdVariableAssignment( object, variable.name, variable.object.name, show = FALSE )
## S4 method for signature 'easyreporting' mkdVariableAssignment( object, variable.name, variable.object.name, show = FALSE )
object |
an easyreporting class object |
variable.name |
a string indicating the name of the variabe to store in the report. (This can be changed here, but further uses of the variable needs to take into account the variable name change). |
variable.object.name |
the name of the already existing variable. (This cannot be canged.) |
show |
a boolean indicating if to show the message before writing it into the rmardown file. |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## leaving the default options to the code chunk mkdCodeChunkSt(rd) ## adding a variable assignement variable <- 1 mkdVariableAssignment(rd, "variable", "variable", show=TRUE) mkdCodeChunkEnd(rd) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## leaving the default options to the code chunk mkdCodeChunkSt(rd) ## adding a variable assignement variable <- 1 mkdVariableAssignment(rd, "variable", "variable", show=TRUE) mkdCodeChunkEnd(rd) ## End(Not run)
add a bibfile name to the object that will be reflected into the report as a bibliography section
setBibliography(object, bibfile = NULL)
setBibliography(object, bibfile = NULL)
object |
an easyreporting class object |
bibfile |
a path string with the name of the bib file |
none
## Not run: TBD ## End(Not run)
## Not run: TBD ## End(Not run)
set an optionList to the class, it automatically sets the options for the rmarkdown file. Are useful for the interpretation/execution of the code chunks.
setOptionsList( object, cacheFlag = TRUE, evalFlag = TRUE, echoFlag = TRUE, warningFlag = FALSE, showMessages = FALSE, includeFlag = TRUE, collapseFlag = FALSE, purlFlag = TRUE, errorFlag = TRUE, messageFlag = TRUE, highlightFlag = TRUE, promptFlag = FALSE, stripWhiteFlag = TRUE, tidyFlag = FALSE )
setOptionsList( object, cacheFlag = TRUE, evalFlag = TRUE, echoFlag = TRUE, warningFlag = FALSE, showMessages = FALSE, includeFlag = TRUE, collapseFlag = FALSE, purlFlag = TRUE, errorFlag = TRUE, messageFlag = TRUE, highlightFlag = TRUE, promptFlag = FALSE, stripWhiteFlag = TRUE, tidyFlag = FALSE )
object |
an easyreporting class object |
cacheFlag |
boolean for caching chunk data (default TRUE) |
evalFlag |
boolean for evaluating the code chunk in the compiled version (default TRUE) |
echoFlag |
boolean for showing the code chunk (default TRUE) |
warningFlag |
boolean for showing the chunk warnings (default FALSE) |
showMessages |
boolean for showing the chunk warnings in compiled version (default FALSE) |
includeFlag |
boolean for including the code chunk in the compiled version (default TRUE) |
collapseFlag |
boolean for collapsing the code chunk in the compiled version (default FALSE), |
purlFlag |
boolean for extracting the code chunk as R code in a separate R file (default TRUE), |
errorFlag |
boolean for including the error generated by the code chunk in the compiled version (default TRUE), |
messageFlag |
boolean for including the code chunk messages in the compiled version (default TRUE), |
highlightFlag |
boolean for highlinghtinh the code chunk in the compiled version (default TRUE), |
promptFlag |
boolean for including a ">" for the code chunk in the compiled version (default FALSE), |
stripWhiteFlag |
boolean for removing the white spaces at beginning/end of the code chunk in the compiled version (default TRUE), |
tidyFlag |
boolean for creating a tidy code chunk in the compiled version (default FALSE). |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## setting default option setOptionsList(rd) ## modifying only some options rd <- setOptionsList(rd, warningFlag=TRUE, showMessages=TRUE, includeFlag=TRUE) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## setting default option setOptionsList(rd) ## modifying only some options rd <- setOptionsList(rd, warningFlag=TRUE, showMessages=TRUE, includeFlag=TRUE) ## End(Not run)
set an optionList to the class
## S4 method for signature 'easyreporting' setOptionsList( object, cacheFlag = TRUE, evalFlag = TRUE, echoFlag = TRUE, warningFlag = FALSE, showMessages = FALSE, includeFlag = TRUE, collapseFlag = FALSE, purlFlag = TRUE, errorFlag = TRUE, messageFlag = TRUE, highlightFlag = TRUE, promptFlag = FALSE, stripWhiteFlag = TRUE, tidyFlag = FALSE )
## S4 method for signature 'easyreporting' setOptionsList( object, cacheFlag = TRUE, evalFlag = TRUE, echoFlag = TRUE, warningFlag = FALSE, showMessages = FALSE, includeFlag = TRUE, collapseFlag = FALSE, purlFlag = TRUE, errorFlag = TRUE, messageFlag = TRUE, highlightFlag = TRUE, promptFlag = FALSE, stripWhiteFlag = TRUE, tidyFlag = FALSE )
object |
an easyreporting class object |
cacheFlag |
boolean for caching chunk data (default TRUE) |
evalFlag |
boolean for evaluating the code chunk in the compiled version (default TRUE) |
echoFlag |
boolean for showing the code chunk (default TRUE) |
warningFlag |
boolean for showing the chunk warnings (default FALSE) |
showMessages |
boolean for showing the chunk warnings in compiled version (default FALSE) |
includeFlag |
boolean for including the code chunk in the compiled version (default TRUE) |
collapseFlag |
boolean for collapsing the code chunk in the compiled version (default FALSE), |
purlFlag |
boolean for extracting the code chunk as R code in a separate R file (default TRUE), |
errorFlag |
boolean for including the error generated by the code chunk in the compiled version (default TRUE), |
messageFlag |
boolean for including the code chunk messages in the compiled version (default TRUE), |
highlightFlag |
boolean for highlinghtinh the code chunk in the compiled version (default TRUE), |
promptFlag |
boolean for including a ">" for the code chunk in the compiled version (default FALSE), |
stripWhiteFlag |
boolean for removing the white spaces at beginning/end of the code chunk in the compiled version (default TRUE), |
tidyFlag |
boolean for creating a tidy code chunk in the compiled version (default FALSE). |
none
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## setting default option setOptionsList(rd) ## modifying only some options rd <- setOptionsList(rd, warningFlag=TRUE, showMessages=TRUE, includeFlag=TRUE) ## End(Not run)
## Not run: rd <- easyreporting(filenamePath="./project_report", title="example_report", author=c("It's me")) ## setting default option setOptionsList(rd) ## modifying only some options rd <- setOptionsList(rd, warningFlag=TRUE, showMessages=TRUE, includeFlag=TRUE) ## End(Not run)