summaryWTH: Basic Summary Statistics for Environmental Data

View source: R/summary_weather.R

summaryWTHR Documentation

Basic Summary Statistics for Environmental Data

Description

Summarize get_weather() outputs based on environments and defined time intervals (e.g.,phenology)

Usage

summaryWTH(
  env.data,
  id.names = NULL,
  env.id = NULL,
  days.id = NULL,
  var.id = NULL,
  statistic = NULL,
  probs = NULL,
  by.interval = FALSE,
  time.window = NULL,
  names.window = NULL
)

Arguments

env.data

data.frame. A get_weather() output.

id.names

vector (character). Indicates the name of the columns to be used as id for the environmental variables to be analysed.

env.id

character. Name of the columns to be used as identification for environments.

days.id

character. Name of the columns indicating the days from start.

var.id

character. Indicates which variables will be used in the analysis.

statistic

vector (character). Indicates what statistic must be analysed, statistic = c('all','sum','mean','quantile'). Default: 'all'.

probs

vector(numeric). Indicates the probability quantiles, as probs = 0,1. If is NULL, probs = c(0.25,.50,.75).

by.interval

boolean. Indicates if temporal intervals must be computed within each environment. Default = FALSE.

time.window

vector (numeric). If by.interval = TRUE, this argument indicates the temporal breaks for delimited intervals.

names.window

vector(character). If by.interval = TRUE, this argument indicates the names of the desirable intervals.

Details

TODO

Author(s)

Germano Costa Neto

Examples

## Not run: 
### Fetching weather information from NASA-POWER
env.data = get_weather(lat = -13.05, lon = -56.05)

### Basic summary
summaryWTH(env.data)

### Returning only mean values
summaryWTH(env.data, env.id = 'env', statistic = 'mean')

### Summary by time intervals given by time.window and names.window
summaryWTH(env.data, env.id = 'env', by.interval = TRUE,
           time.window = c(0, 14, 35, 60, 90, 120),
           names.window = c('P-E', 'E-V1', 'V1-V4', 'V4-VT', 'VT-GF', 'GF-PM'))

## End(Not run)


allogamous/EnvRtype documentation built on Nov. 1, 2024, 3:48 a.m.