nested_analysis: Perform an analysis on a nested data matrix

View source: R/nested_data_matrix.R

nested_analysisR Documentation

Perform an analysis on a nested data matrix

Description

Perform an analysis on a nested data matrix

Usage

nested_analysis(
  .data,
  .fun,
  ...,
  .output_column = "model",
  .reserved_names = NULL,
  .env = parent.frame()
)

Arguments

.data

A data frame with a list column of data frames, possibly created using nested_data.

.fun

A model function

...

Passed to fun

.output_column

A column name in which the output of .fun should be stored.

.reserved_names

Names that should not be allowed as columns in any data frame within this object

.env

Passed to as_function

Value

.data with an additional list column of fun output

Examples

nd <- nested_data(
  alta_lake_geochem,
  qualifiers = c(age, depth, zone),
  key = param,
  value = value,
  trans = scale
)

na <- nested_analysis(nd, vegan::rda, X = data)
plot(na)


paleolimbot/tidypaleo documentation built on Jan. 25, 2023, 2:43 a.m.