Learn R Programming

hsdar (version 0.5.1)

t.test: t-test for nri values

Description

Performs t-tests for nri values.

Usage

"t.test"(x, ...)

Arguments

x
Object of class 'nri'.
...
Arguments to be passed to t.test.

Value

An object of class "data.frame"

See Also

t.test, cor.test,Nri-method

Examples

Run this code

data(spectral_data)


## Calculate nri-values for WorldView-2-8
spec_WV <- spectralResampling(spectral_data, "WorldView2-8",
                              response_function = FALSE)
nri_WV <- nri(spec_WV, recursive = TRUE)

## Perform t.tests between nri-values of both sites 
season <- spec_WV$attributes$season
ttestres <- t.test(x = nri_WV, y = season, alternative = "two.sided")
ttestres

## Plot p.values of t.tests
plot(ttestres)

Run the code above in your browser using DataLab