find_comments | R Documentation |
This function uses specific criteria for finding comment records that may not match up with your coding conventions. See details below as well as unit tests.
find_comments(x, ...)
## S3 method for class 'data.frame'
find_comments(x, ...)
## S3 method for class 'character'
find_comments(x, ...)
## S3 method for class 'logical'
find_comments(x, ...)
x |
a data frame or character vector |
... |
not used |
For the data frame method, comments are found in a column with name C
with type character
. If a C
column is found that is not character,
a warning is generated and no comments are found.
For the character method or when an appropriate C
column is found when
using the data frame method, a position or row is considered a comment
when it is either NA
or when it is equal to .
.
A logical vector
comment <- c(NA, "C", "C", NA, ".", NA, "Comment")
dv <- rnorm(length(comment))
df <- data.frame(C = comment , DV = dv, stringsAsFactors = FALSE)
find_comments(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.