rtfWriteTableComments
DESCRIPTION:
Creates the RTF text to add comments/footnotes to a table.
USAGE:
rtfWriteTableComments(usedComments, rtfFile, superscriptText = NULL, writeText = T,
CommentID = CONCTRTBLCOMMENTIDS, CommentText = CONCTRTBLCOMMENTTEXT,
fontsize = 10, cmtStyle = TableNoteInfoStyle,
textbetween = rep(" ", length(usedComments))
ARGUMENTS:
- usedComments
-
Character vector of comments used in table (no default).
- rtfFile
-
rtfFile to write the output to if writeText=T.
- superscriptText
-
- list of text to superscript for footnotes (e.g. a,b,c or 1,2,3...) NULL
means no foot notes (default=NULL)
- writeText
-
T/F determining whether RTF text for row should be written to
the given file or not or if the string should just be returned.
- CommentID
-
Vector of all possible comments as IDs should match list of
comment text given in CommentText parameter (default=CONCTRTBLCOMMENTIDS).
- CommentText
-
Vector of all possible comments text matching comment
ids in Comment ID parameter (default=CONCTRTBLCOMMENTTEXT).
- fontsize
-
Font point size for comments.
- cmtStyle
-
RTF text style to use for the comment text. (default=TableNoteInfoStyle)
- textbetween
-
Text that should go between the comment ids and the comment text . (default=rep(" ", length(usedComments))
VALUE:
String containing the RTF that will create the comments/footnotes as specified; if
writeText=T, the return string can be ignored, otherwise the calling function
will need to write the string to the RTF file.
AUTHOR(S):
TIBCO Software Inc.
EXAMPLES:
## write out superscript footnotes
outString1 <- rtfWriteTableComments(c("NA", "NC"), "myfile.rtf", c("a", "b"), writeText=F,
CommentID=c("NA", "NC", "NS"),
CommentText=c("Not analyzed", "Not calculated"))
## write out "plain" footnotes
outString2 <- rtfWriteTableComments("NA", "myfile.rtf", NULL, writeText=F,
CommentID=c("NA", "NS"),
CommentText=c("Not analyzed", "No sample"))