baseline_linear | R Documentation |
Linear Baseline Estimation
baseline_linear(x, y, ...)
## S4 method for signature 'numeric,numeric'
baseline_linear(x, y, points = range(x))
## S4 method for signature 'ANY,missing'
baseline_linear(x, points = range(x))
x , y |
A |
... |
Currently not used. |
points |
A |
Returns a list
with two components x
and y
.
N. Frerebeau
signal_correct()
Other baseline estimation methods:
baseline_asls()
,
baseline_peakfilling()
,
baseline_polynomial()
,
baseline_rollingball()
,
baseline_rubberband()
,
baseline_snip()
## X-ray diffraction
data("XRD")
## Plot spectrum
plot(XRD, type = "l", xlab = expression(2*theta), ylab = "Count")
## Linear baseline
baseline <- baseline_linear(XRD, points = c(25, 34))
plot(XRD, type = "l", xlab = expression(2*theta), ylab = "Count")
lines(baseline, type = "l", col = "red")
## Correct baseline
XRD$count <- XRD$count - baseline$y
plot(XRD, type = "l", xlab = expression(2*theta), ylab = "Count")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.