parse_lambdas: Parse Maxent lambdas information

Description Usage Arguments Value Warning Author(s) References See Also Examples

Description

Parse Maxent .lambdas files to extract the types, weights, minima and maxima of features, as well as the fitted model's entropy and other values required for predicting to new data.

Usage

1
parse_lambdas(lambdas)

Arguments

lambdas

Either a MaxEnt fitted model object (fitted with the maxent function in the dismo package), or a file path to a Maxent .lambdas file.

Value

A list with five elements:

Warning

This function is still in development, and no guarantee is made for the accuracy of its projections.

Author(s)

John B. Baumgartner, johnbaums@gmail.com

References

See Also

read_mxe project_maxent

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Below we use the dismo::maxent example to fit a Maxent model:
if (require(dismo) && require(rJava) && 
    file.exists(file.path(system.file(package='dismo'), 'java/maxent.jar'))) {
  fnames <- list.files(path=paste(system.file(package="dismo"), '/ex', sep=''),
  pattern='grd', full.names=TRUE )
  predictors <- stack(fnames)
  occurence <- paste(system.file(package="dismo"), '/ex/bradypus.csv', sep='')
  occ <- read.table(occurence, header=TRUE, sep=',')[,-1]
  me <- maxent(predictors, occ, path=file.path(tempdir(), 'example'), 
               factors='biome')

  # ... and then parse the lambdas information:
  parse_lambdas(me)
  parse_lambdas(file.path(tempdir(), 'example/species.lambdas'))
  
}

johnbaums/things documentation built on May 19, 2019, 3:03 p.m.