get_comments: Collect comments lines starting from "#C" in datfile,...

View source: R/get_comments.r

get_commentsR Documentation

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.

Author(s)

Yukio Takeuchi

See Also

SS_readdat, SS_readdat_3.30, SS_readctl, SS_readctl_3.30


r4ss documentation built on May 28, 2022, 1:11 a.m.