| Didata | R Documentation |
Common functions to handle "Didata" class results, which store all
data used in the modality analysis.
## S3 method for class 'Didata'
print(x, ...)
## S3 method for class 'Didata'
summary(object, ...)
x |
an object of class |
object |
an object of class |
... |
extra arguments, ignored for all methods |
Didata is a matrix that contains all data used in the modality analysis,
with contents that depends on which analyses are run. The matrix has one
column for each raw data point. Dimodal creates the Didata object
internally; there is no public function to generate it. Row "xmid"
is the interpolated raw value for each index, as calculated by
midquantile(data["xsort",], type=#), where the algorithm type is
provided by the option "data.midq". Row "signed" added by
the interval spacing analysis is its signed difference, where differences
within an order of magnitude of .Machine.double.eps are treated as
ties to avoid numerical precision errors.
The print method shows the source of the data and any filters applied to
the spacing. It then prints a table with the valid columns, range of
values, and standard deviation of the original data and spacing. If
low-pass and interval spacing were needed by Dimodal, then information
about them is added to the table. The method uses option "digits" to
control the number of significant digits for raw values. If it is set to
zero then the standard options()$digits is used.
The summary method prints just the setup information.
The basic data stored in the matrix contains the rows
x |
the original data |
xsort |
sorted data |
xmid |
the mid-distribution from |
Di |
the spacing; index 1 is NA |
If low-pass spacing is required, Dimodal adds the row
lp |
spacing after low-pass filtering |
where the leading and trailing columns are set to NA when part of the filter falls outside the data.
If interval spacing is needed, the matrix also contains rows
Diw |
the interval spacing |
signed |
the signed difference of the interval spacing, with values -1, 0, +1 $ |
where the leading columns up to the width of the interval are set NA. The signed difference has an additional NA.
Several bits of metadata are stored as attributes with the matrix, in addition to any generated by R. The basic analysis provides
data.name |
the source of the data in the call to |
Low-pass filtering adds
lp.kernel |
the name of the filter |
lp.window |
the window or size of the filter, as provided
by |
wlp |
the actual window width in data points |
lp.stID |
the first column in the matrix with valid low-pass values |
lp.endID |
the last column (inclusive) that is valid |
Interval spacing adds
diw.window |
the interval size, as provided by |
wdiw |
the interval in data points |
diw.stID |
the first column in the matrix with valid interval spacing; the last valid column is the end of the matrix |
Note that the signed row starts one column after the interval spacing,
at diw.stID + 1, and runs to the end of the matrix.
The methods return the object, invisibly.
Dimodal,
Diopt,
midquantile
m <- Dimodal(faithful$eruptions, Diopt.local(diw.window=16))
m$data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.