View source: R/read.OceanView.R
read.OceanView | R Documentation |
Read contents of one spectroscopic file produced by OcenView software
(Ocen Optics, Inc.) to hyperSpec
object.
Supported file formats areeither TimeSeries data file with header or
ASCII data file with header.
Suported versions of file are 'OceanView 1.5.2' and 'OceanView 1.5.0?'
read.OceanView(
file,
dec = ".",
parse_filename = NULL,
ignore.case = FALSE,
xlab = NULL,
ylab = "I, a.u.",
last_headerline_text = ">>>>>Begin Spectral Data<<<<<",
software = "OceanView",
version_ = "1.5.2",
n = 17,
file_format = c("auto", "ascii", "ts", "timeseries")[1]
)
read.OceanView2(file, dec = ",", ..., file_format = "auto")
read.OceanView0(
file,
dec = ".",
...,
file_format = "auto",
parse_filename = parser_1
)
read.OceanView.ascii(file, dec = ".", ..., file_format = "ascii")
read.OceanView.ascii2(file, dec = ",", ..., file_format = "ascii")
read.OceanView.ascii0(
file,
dec = ".",
...,
file_format = "ascii",
parse_filename = parser_1
)
read.OceanView.ts(file, dec = ".", ..., file_format = "ts")
read.OceanView.ts2(file, dec = ",", ..., file_format = "ts")
read.OceanView.ts0(
file,
dec = ".",
...,
file_format = "ts",
parse_filename = parser_1
)
file |
(string) A name of OcenView file . |
dec |
("." | ",") The character used in the file for decimal points , e.g.
period ( |
parse_filename |
(function | string | NULL) Either a function that
parses string of filename and
extracts relevant information, |
ignore.case |
A logical that indicates if regular extression in
|
xlab |
(string | NULL) Label for x (wavelength) axis.
If |
ylab |
(string) Label for y (intensity) axis. Defaut is |
last_headerline_text |
(string) A string, that indicates the last header line.
Default is |
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". |
n |
(integer) Number of header lines to be scanned . Default is 17.
These lines include the header line indicated in
|
file_format |
( |
In read.OceanView
the default decimal symbol is period
(.
). In read.OceanView2
- comma (,
).
A hyperSpec
object with technical and
spectroscopic information from file file
.
Vilmantas Gegzna
Other functions to read spectroscopic data:
file
,
read.OOIBase32()
,
read.OceanView.header()
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.header()
,
read.sp.csv2()
,
read3csv2hy()
,
replace_spc()
,
sd_outliers()
,
spStat()
,
sp_class_perform()
## Not run:
library(spHelper)
read.OceanView("Spectra.txt")
read.OceanView("Spectra.txt", dec = ",")
read.OceanView2("Spectra.txt")
# Read several files to one `hyperspec` object:
Files <- dir()[1:4] # 4 files are sellected
sp_list <- lapply(Files, read.OceanView) # Makes a list of objects
sp <- collapse(sp_list) # Makes one object
plotmat(sp)
# -------------------------------------------------------------------
files <- dir("data-raw/demo spectra", full.names = TRUE)
# ts example:
file.ts <- files[3]
read.OceanView(file.ts) %T>% plot(col=2:3) %>% summary_hyData
# ascii examples:
file.ascii.Raman <- files[1]
read.OceanView(file.ascii.Raman) %T>% plot(col=2) %>% summary_hyData
file.ascii.Fluorescence <- files[2]
read.OceanView(file.ascii.Fluorescence) %T>% plot(col=4) %>% summary_hyData
read.OceanView(file.ascii.Fluorescence)$.. %>% head
# .Scope example:
file.Scope <- files[4]
read.OOIBase32(file.Scope) %T>% plot(col=5) %>% summary_hyData
read.OOIBase32(file.Scope)$.. %>% head
# -------------------------------------------------------------------
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.