knitr::knit_hooks$set(margin = function(before,options,envir) {
if(before) par(mgp=c(1.5,0.5,0),bty="n",plt=c(.105,.97,.13,.97)) else NULL })

knitr::opts_chunk$set(margin=T,prompt=T,comment="",collapse=T,cache=F,
dev.args=list(pointsize=11),fig.height=3.5,
fig.width=4.24725,fig.retina=2,fig.align="center")

Installation and loading

You can install srtmVN from GitHub

# install.packages("devtools")
devtools::install_github("choisy/srtmVN", build_vignettes = TRUE)

Once installed, you can load the package:

library(srtmVN)

Usage examples

The RasterLayer DEM from SRTM can be retrieved with the getsrtm function:

srtm <- getsrtm()

It's a RasterLayer object:

srtm

that can be plotted with the plot method:

plot(srtm)


choisy/srtmVN documentation built on Aug. 21, 2019, 2:14 p.m.