Learn R Programming

enmSdmX (version 1.2.12)

.calcWeights: Calculate weights for a model

Description

Calculates weighting for a model. Each record receives a numeric weight.

Usage

.calcWeights(w, data, resp, family)

Value

A numeric vector.

Arguments

w

Either logical in which case TRUE (default) causes the total weight of presences to equal the total weight of absences (if family='binomial') or a numeric vector of weights, one per row in data or the name of the column in data that contains site weights. If FALSE, then each datum gets a weight of 1.

data

Data frame

resp

Name of response column

family

Name of family