write_flags {dataresqc} | R Documentation |
Add quality flags to a data file in Station Exchange Format version 1.0.0
Description
Add quality flags to a data file in Station Exchange Format version 1.0.0
Usage
write_flags(infile, qcfile, outpath, note = "", match = TRUE)
Arguments
infile |
Character string giving the path of the SEF file. |
qcfile |
Character string giving the path of the file with the quality flags as produced with the QC tests. This file must have 6 (8) tab-separated columns for daily (sub-daily) data: variable code, year, month, day, (hour), (minute), value, semicolon(';')-separated failed tests. |
outpath |
Character string giving the output path. |
note |
Character string to be added to the end of the name of the input file to form the output filename. It will be separated from the rest of the name by an underscore. Blanks will be also replaced by underscores. If not specified, input and output filenames will be identical. |
match |
Write the flags only if the values in the qc file are identical to those in the SEF file (default to TRUE). |
Note
The data will be converted to the standard units adopted by the qc. An exception is made for cloud cover (oktas will not be converted).
If match
is set to FALSE, the flags will be added to the dates given
in the qc files without checking that the entries in the Value column correspond.
This can be useful when there have been minor changes to the SEF file
(for instance, a different rounding) after the quality control was applied,
but can lead to overflagging when hour and minute values are missing.
Author(s)
Yuri Brugnara