env_typing | R Documentation |
Returns environmental typologies that can be used as envirotype markers. This typologies are given based on cardinals (discrete intervals for each variable). The user must inform the name of the environmental variables of interest and inform the cardinal option as list of cardinal vectors for each variable. Its also possible to fix intervals or scale data.
env_typing(
env.data,
var.id,
env.id,
cardinals = NULL,
days.id = NULL,
time.window = NULL,
names.window = NULL,
quantiles = NULL,
id.names = NULL,
by.interval = FALSE,
scale = FALSE,
format = NULL
)
env.data |
data.frame of environmental variables gotten from |
var.id |
character. Indicates which variables will be used in the analysis. |
env.id |
vector (character). Indicates the name of the columns to be used as id for environments. |
cardinals |
list (numeric). A list of cardinals (vector of numeric thresholds) for each variable. Indicates the cardinal limtis for each environmental type. If is NULL, see quantles argument. |
days.id |
character. Name of the columns indicating the days from start. |
time.window |
vector (numeric). If |
names.window |
vector(character). If |
quantiles |
vector (numeric). Indicates the probability quantiles, as probs = 0,1, if cardinals is |
id.names |
vector (character). Indicates the name of the columns to be used as id for the environmental variables to be analysed. |
by.interval |
boolean. Indicates if temporal intervals must be computed insied of each environment. Default = FALSE. |
scale |
boolean. If |
format |
character. The shape of the output, assuming |
TODO
A dataframe with environmental typologies. Event frequencies are provided for each variable at each environment within each interval.
Germano Costa Neto
## Not run:
### Fetching weather information from NASA-POWER
env.data = get_weather(lat = -13.05, lon = -56.05)
### By.intervals (generic time intervals)
env_typing(env.data = env.data, env.id = 'env', var.id = 'T2M', by.interval = TRUE)
### By.intervals (specific time intervals)
env_typing(env.data = env.data,
env.id = 'env',
var.id = 'T2M',
by.interval = TRUE,
time.window = c(0, 15, 35, 65, 90, 120))
### By.intervals (specific time intervals and with specific names
env_typing(env.data = env.data,
env.id = 'env',
var.id = 'T2M',
by.interval = TRUE,
time.window = c(0, 15, 35, 65, 90, 120),
names.window = c('1-intial growing',
'2-leaf expansion I',
'3-leaf expansion II',
'4-flowering',
'5-grain filling',
'6-maturation'))
### With set cardinals.
env_typing(env.data = env.data,
var.id = c('T2M','PRECTOT','WS2M'),
cardinals = list(T2M = c(0, 9, 22, 32, 45),
PRECTOT = c(0, 5, 10),
WS2M = NULL),
env.id = 'env')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.