reduce.env: Reduce environmental data

Description Usage Arguments Details Value See Also Examples

Description

This function allows reduce environmental data clipping by mask or buffer area

Usage

1
reduce.env(env, transfer = NULL, occ_data, mask)

Arguments

env

RasterStack* objet.

transfer

List of rasterstack object

occ_data

A data.frame of occurrence records. It must include two column based on latitude and longitude.

mask

Croped mask, must be shapefile (.shp), readOGR.

Details

Reduce the correlation among predicted variables either buffer zone, or clipping mask.

Provide reduce objet with cut predicted variables and data.frame for the values of each point of occurrence of them.

Value

@crop RasterStack* Objet

@m.env data.frame of environmental values to occurrence localities.

See Also

cor.show

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Phytotoma ocurrence data
data(phytotoma)


# Complement
library(dismo)
predictor <- stack(list.files(path=paste(system.file(package="dismo"),'/ex', sep=''),
 pattern='grd', full.names=TRUE ))

 maskM <- stim.M(phytotoma[,2:3], 131)

reduce_cut <- reduce.env(env = predictor, occ_data = phytotoma[,2:3], mask=maskM)

# Plot reduce_cut
plot(reduce_cut@cropa$bio1)

# Add points
points(phytotoma[,2:3], pch=16,col='blue')

# Correlogram
cor.show(reduce_cut)
rd <- c('bio1','bio12','bio16','biome','bio8')

# Removing rd-variables on correlogram
cor.show(reduce_cut, rm=TRUE, var.rm = rd)

# Remove rd-variables
var_reduce <- dropLayer(reduce_cut@cropa, rd)

# summary
var_reduce

sdStaf documentation built on May 1, 2019, 8:50 p.m.