Description Usage Arguments Value Author(s) Examples
View source: R/read_CamSizerXT.R
This function imports ASCII-output of the Retsch CamSizerXT device.
1 | read_CamSizerXT(file, output = "p3")
|
file |
|
output |
|
List object with imported data. Elements x and
y are grain size class limits and measured content,
respectively. The object data contains a list with all
measured parameters. Object meta contains meta data.
The CamSizerXT software allows exporting measurement data
as ACII-files. Therefore use Menu > Evaluation > Daily Report,
select the desired measurement file, toggle all measured
parameters of interest and use menu File > Export (as *.xle).
This creates an Excel-readable file, which however cannot be
imported to R, yet. So it needs to be opened in Excel and
exported as *.txt-file. In summery, please do not change the
files. it is the ASCII-file directly generated by Excel that
can be imported to R.
The output is a list object with four elements. x and
y can be directly used to plot the object and will
contain the primary size definition as set in the input parameters,
by default p3, and the respective amount of the parameter. The
element data is a list object. The CamSizer XT supports more
than one output file per sample. And thus, several definitions of grain
size are possible (see x$meta$size.definition). For each of the
size definitions as series of grain size and shape parameters are
measured. The measured parameters are stored in
x$meta$parameters and as column names in the data object. Finally,
a meta data object is returned.
Michael Dietze
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ## uncomment to use or use example data set just below
## load example data
# x <- read.CamSizerXT(file = "CamSizerXT.txt")
## read example data set
data(CamSizerXT, envir = environment())
## plot default data set parmeters (p3 vs. class limits)
plot(CamSizerXT, type = "l", log = "x")
## show some data
CamSizerXT$meta$ID
CamSizerXT$meta$parameters
## plot grain size distributions of the four size definitions
plot(NA,
xlim = range(CamSizerXT$x),
ylim = range(CamSizerXT$y),
main = "Dune sand, p3-distribution",
xlab = "Grain size",
ylab = "Amount",
log = "x")
for(i in 1:length(CamSizerXT$meta$size.definition)) {
lines(x = CamSizerXT$x,
y = CamSizerXT$data[[i]][,1],
col = i)
}
legend(x = "topleft",
legend = CamSizerXT$meta$size.definition,
col = 1:4,
lty = 1)
## plot grain size distribution and symmetry
plot(CamSizerXT,
main = "Dune sand",
xlab = "Grain size (micrometres)",
ylab = "Amount (%), Symmetry index * 3",
xlim = c(100, 1000),
log = "x",
type = "l")
lines(x = CamSizerXT$x,
y = CamSizerXT$data[[1]][,14] * 3,
col = "grey")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.