das_comments | R Documentation |
Extract comments from DAS data
das_comments(x)
## S3 method for class 'data.frame'
das_comments(x)
## S3 method for class 'das_df'
das_comments(x)
## S3 method for class 'das_dfr'
das_comments(x)
x |
an object of class |
This function recreates the comment strings by pasting the Data# columns back together for the C events (comments). See the examples section for how to search for comments with certain phrases
x
, filtered for C events and with the added column
comment_str containing the concatenated comment strings
y <- system.file("das_sample.das", package = "swfscDAS")
y.proc <- das_process(y)
das_comments(y.proc)
# Extract all comments containing "record" - could also use stringr pacakge
y.comm <- das_comments(y.proc)
y.comm[grepl("record", y.comm$comment_str, ignore.case = TRUE), ]
# Join comments with processed data
dplyr::left_join(y.proc, y.comm[, c("file_das", "line_num", "comment_str")],
by = c("file_das", "line_num"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.