The .cnv file format is the primary file format used for input and output to SBE Data Processing. The format is essentially a fixed-width format using 11 characters for each column.
read_sbe_cnv( file, skip = 0, n_max = Inf, header = read_sbe_header(file), col_names = read_sbe_cnv_colmeta(file, header)$name, widths = rep(11L, length(col_names)) ) read_sbe_cnv_colmeta(file, header = read_sbe_header(file)) read_sbe_header(file, n_header = 500)
file | A file, URL, or connection. Files ending in .gz, .bz2, .xz, or
.zip will be automatically uncompressed; URLs will be automatically
downloaded. See |
---|---|
skip | Number of non-header rows to skip. |
n_max | Maximum number of rows to read. |
header | A previously read value obtained from |
col_names | The column names. Defaults to the |
widths | A vector the same length as |
n_header | The starting guess for number of header lines. |
#> # A tibble: 15,225 x 6 #> t090C `c0S/m` prDM sal00 density00 flag #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 8.30 3.66 4.55 35.1 1027. 0 #> 2 8.30 3.66 4.51 35.1 1027. 0 #> 3 8.30 3.66 4.55 35.1 1027. 0 #> 4 8.30 3.66 4.51 35.1 1027. 0 #> 5 8.30 3.66 4.50 35.1 1027. 0 #> 6 8.30 3.66 4.51 35.1 1027. 0 #> 7 8.30 3.66 4.51 35.1 1027. 0 #> 8 8.30 3.66 4.51 35.1 1027. 0 #> 9 8.30 3.66 4.50 35.1 1027. 0 #> 10 8.30 3.66 4.49 35.1 1027. 0 #> # … with 15,215 more rowsread_sbe_cnv_colmeta(file)#> # A tibble: 6 x 4 #> index name long_name unit #> <dbl> <chr> <chr> <chr> #> 1 1 t090C Temperature ITS-90, deg C #> 2 2 c0S/m Conductivity S/m #> 3 3 prDM Pressure, Digiquartz db #> 4 4 sal00 Salinity, Practical PSU #> 5 5 density00 Density density, kg/m^3 #> 6 6 flag Flag NA#> [1] "* Sea-Bird SBE 9 Raw Data File:" #> [2] "* FileName = C:\\CTDDATA\\9568D008.DAT" #> [3] "* Software Version 4.211" #> [4] "* Temperature SN = 1764" #> [5] "* Conductivity SN = 1535" #> [6] "* Number of Bytes Per Scan = 24"# header information is kept on read with the 'header' attribute cnv <- read_sbe_cnv(file) head(attr(cnv, "header"))#> [1] "* Sea-Bird SBE 9 Raw Data File:" #> [2] "* FileName = C:\\CTDDATA\\9568D008.DAT" #> [3] "* Software Version 4.211" #> [4] "* Temperature SN = 1764" #> [5] "* Conductivity SN = 1535" #> [6] "* Number of Bytes Per Scan = 24"