View source: R/nested_data_matrix.R
nested_data | R Documentation |
Prepare a parameter-long data frame for statistical analysis
nested_data( .data, qualifiers = NULL, key = NULL, value, fill = NA, select_if = ~TRUE, filter_all = any_vars(TRUE), trans = identity, groups = NULL ) unnested_data(.data, ...)
.data |
Data in parameter-long form |
qualifiers |
Columns that add context to observations (e.g., depth, zone, core) |
key |
The column name that contains the column names of the data matrix |
value |
The column name that contains the values |
fill |
If a key/value combination doesn't exist in the input, this value will be assigned in the data matrix. Generally, using NA for geochemical data and 0 for relative abundance data is advised. |
select_if |
Use |
filter_all |
Use |
trans |
A function that will be applied to all columns, column-wise. Use identity to perform no transformation, use scale to scale each column to a mean of zero and variance of 1. See mutate_all. |
groups |
Use group_by or this argument to group by one or more columns (e.g., core or lake) |
... |
One or more columns to unnest. |
A nested data matrix, which is composed of a tibble::tibble()
with tibble list-columns data
, discarded_rows
, discarded_columns
, and
qualifiers
.
nested_data( alta_lake_geochem, qualifiers = c(age, depth, zone), key = param, value = value, trans = scale )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.