Learn R Programming

raincpc (version 1.1.0)

sdm_as_asc: Raster conversion functions

Description

Raster conversion functions

Usage

sdm_as_asc(x, xll = 1, yll = 1, cellsize = 1)

Arguments

x

is an object of class 'matrix'

xll

is the lat center (not corner!) of lower-left grid

yll

is the lon center (not corner!) of lower-left grid

cellsize

is the resolution of the raster in decimal degrees

Value

Returns an object of class 'asc'.

Details

sdm_as_asc is an adaptation of as.asc from SDMTools; extracts data from objects of class 'RasterLayer' (raster package) into an object of class 'asc'.

Examples

Run this code
# NOT RUN {
#create a simple object of class 'asc'
tasc = sdm_as_asc(matrix(rep(x=1:10, times=1000),nr=100)); print(tasc)
str(tasc)
# }

Run the code above in your browser using DataLab