explorer: Explore data

View source: R/01_read.R

explorerR Documentation

Explore data

Description

Explores data from a data frame in wide format.

Usage

explorer(data, x, y, id, metadata)

Arguments

data

A data.frame containing the input data for analysis.

x

The name of the column in data that contains x points.

y

The names of the columns in data that contain the variables to be analyzed.

id

The names of the columns in data that contains a grouping variable.

metadata

The names of the columns in data to keep across the analysis.

Details

This function helps to explore the dataset before being analyzed with modeler().

Value

An object of class explorer, which is a list containing the following elements:

summ_vars

A data.frame containing summary statistics for each trait at each x point, including minimum, mean, median, maximum, standard deviation, coefficient of variation, number of non-missing values, percentage of missing values, and percentage of negative values.

summ_metadata

A data.frame summarizing the metadata.

locals_min_max

A data.frame containing the local minima and maxima of the mean y values over x.

dt_long

A data.frame in long format, with columns for uid, metadata, var, x, and y

metadata

A character vector with the names of the variables to keep across.

Examples

library(flexFitR)
data(dt_potato)
results <- dt_potato |>
  explorer(
    x = DAP,
    y = c(Canopy, GLI),
    id = Plot,
    metadata = c(gid, Row, Range)
  )
names(results)
head(results$summ_vars)
plot(results, label_size = 4, signif = TRUE, n_row = 2)
# New data format
head(results$dt_long)

flexFitR documentation built on April 16, 2025, 5:09 p.m.