Learn R Programming

r4ss (version 1.44.0)

get_comments: Collect comments lines starting from "#C" in datfile, ctlfile, starter.ss, forecast.ss etc

Description

This function is used internally by SS_readdat_3.30, SS_readctl_3.30. This will identify 1st numeric data in dat (vector of string) Then this function collects lines starting "#C" from lines above 1st numeric data.

Usage

get_comments(dat, defaultComments = NULL)

Arguments

dat

vector of strings usually outputs of readLines(*) * is filename of datfile, ctlfile etc

defaultComments

vector of strings default : NULL, to read whole comments If this function finds lines containg one of elements of defaultComments, those lines will be ignored e.g. c("^#C file created using the SS_writectl function in the R package r4ss", "^#C file write time:") is given, comments generated by SS_writectl_3.30 will be ignored.

See Also

SS_readdat, SS_readdat_3.30, SS_readctl, SS_readctl_3.30