View source: R/read.OceanView.header.R
| read.OceanView.header | R Documentation |
Read header lines with non-spectroscopic information of OceanView (version 1.5.2) file.
read.OceanView.header(
file = NULL,
dec = ".",
n = 17,
software = "OceanView",
version_ = "1.5.2",
software_info = paste(software, version_),
last_headerline_text = ">>>>>Begin Spectral Data<<<<<",
text
)
file |
(string) A name of OcenView file . |
dec |
("." | ",") The character used in the file for decimal points , e.g.
period ( |
n |
(integer) Number of header lines to be scanned . Default is 17.
These lines include the header line indicated in
|
software |
("OceanView" | "OOIBase32") Name of software, that created the file. |
version_ |
("1.5.2" | "1.5.0" | string) A version of OceanView file. Curently supported versions are "1.5.2" (or newer) and "1.5.0". |
software_info |
(string) A combination of |
last_headerline_text |
(string) A string, that indicates the last header line.
Default is |
text |
(strings) Text of header as if it was read with function
|
A dataframe with information, extracted from headerlines.
Vilmantas Gegzna
Other spHelper functions for spectroscopy and hyperSpec:
IQR_outliers(),
binning(),
file,
gapDer(),
hy2mat(),
hyAdd_Label_wl(),
hyAdd_Labels_PAP_PD_2014(),
hyAdd_Labels_TD2009(),
hyAdd(),
hyDrop_NA(),
hyGet_palette(),
hyRm_palette(),
mad_outliers(),
mean_Nsd(),
median_Nmad(),
plot_hyPalette(),
prepare_PAP_RK_2014__MATLAB_failui(),
read.OOIBase32(),
read.OceanView(),
read.sp.csv2(),
read3csv2hy(),
replace_spc(),
sd_outliers(),
spStat(),
sp_class_perform()
Other functions to read spectroscopic data:
file,
read.OOIBase32(),
read.OceanView()
# Read from file: -------------------------------------------
## Not run:
read.OceanView.header("MySpectra.txt")
## End(Not run)
# Read as text: ---------------------------------------------
header <- c(
"Data from MySpectra.txt Node",
"",
"Date: Fri Jan 15 16:15:16 GMT 2014",
"User: Scientist_1",
"Spectrometer: USB2E2321",
"Trigger mode: 4",
"Integration Time (sec): 1.000000E1",
"Scans to average: 1",
"Electric dark correction enabled: true",
"Nonlinearity correction enabled: true",
"Boxcar width: 0",
"XAxis mode: Wavelengths",
"Number of Pixels in Spectrum: 2048",
">>>>>Begin Spectral Data<<<<<"
)
DF <- read.OceanView.header(text = header)
class(DF)
print(DF)
# Examples of file headerline formats: -----------------------
## An example of header lines in OcenView 1.5.2:
# Data from MySpectra.txt Node
#
# Date: Fri Jan 15 16:15:16 GMT 2014
# User: Scientist_1
# Spectrometer: USB2E2321
# Trigger mode: 4
# Integration Time (sec): 1.000000E1
# Scans to average: 1
# Electric dark correction enabled: true
# Nonlinearity correction enabled: true
# Boxcar width: 0
# XAxis mode: Wavelengths
# Number of Pixels in Spectrum: 2048
# >>>>>Begin Spectral Data<<<<<
## An example of header lines in OcenView 1.5.0:
# Data from MySpectra.txt Node
#
# Date: Fri Jan 15 16:15:16 GMT 2016
# User: Scientist_1
# Spectrometer: USB2E2321
# Autoset integration time: false
# Trigger mode: 4
# Integration Time (sec): 1.000000E1
# Scans to average: 1
# Electric dark correction enabled: true
# Nonlinearity correction enabled: true
# Boxcar width: 0
# XAxis mode: Wavelengths
# Stop averaging: false
# Number of Pixels in Spectrum: 2048
# >>>>>Begin Spectral Data<<<<<
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.