Commit 9ca1b532 authored by Johannes Knoch's avatar Johannes Knoch
Browse files

lower case for the first letter of the function; documentation adapted

parent bfd31676
# Generated by roxygen2: do not edit by hand # Generated by roxygen2: do not edit by hand
export(WriteOutSamples)
export(clip) export(clip)
export(iplot) export(iplot)
export(load_reference_as_shape) export(load_reference_as_shape)
...@@ -13,4 +12,5 @@ export(sample_nb) ...@@ -13,4 +12,5 @@ export(sample_nb)
export(save_class_tiff) export(save_class_tiff)
export(save_kml) export(save_kml)
export(save_run) export(save_run)
export(writeOutSamples)
exportClasses(Habitat) exportClasses(Habitat)
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#' @export #' @export
###write out selected samples ###write out selected samples
WriteOutSamples <- function (inPath, step, className, output_format = c("shp", "geojson")) { writeOutSamples <- function (inPath, step, className, output_format = c("shp", "geojson")) {
paste(inPath, "step_", step, "_", className, ".tif", sep = "") paste(inPath, "step_", step, "_", className, ".tif", sep = "")
run1 <- get(load(paste(inPath, "Run", step, sep = ""))) run1 <- get(load(paste(inPath, "Run", step, sep = "")))
...@@ -63,7 +63,7 @@ WriteOutSamples <- function (inPath, step, className, output_format = c("shp", " ...@@ -63,7 +63,7 @@ WriteOutSamples <- function (inPath, step, className, output_format = c("shp", "
res <- sp::spTransform(res, CRS("+proj=longlat +datum=WGS84 +init=epsg:4326")) res <- sp::spTransform(res, CRS("+proj=longlat +datum=WGS84 +init=epsg:4326"))
rgdal::writeOGR( rgdal::writeOGR(
res, obj = res,
layer = paste("SamplePoints_step_", step, "_", className, sep = ""), layer = paste("SamplePoints_step_", step, "_", className, sep = ""),
dsn = paste(inPath, "SamplePoints_step_", step, "_", className, ".geojson", sep = ""), dsn = paste(inPath, "SamplePoints_step_", step, "_", className, ".geojson", sep = ""),
driver = "GeoJSON", driver = "GeoJSON",
...@@ -76,7 +76,7 @@ WriteOutSamples <- function (inPath, step, className, output_format = c("shp", " ...@@ -76,7 +76,7 @@ WriteOutSamples <- function (inPath, step, className, output_format = c("shp", "
res <- sp::spTransform(res, CRS("+proj=longlat +datum=WGS84 +init=epsg:4326")) res <- sp::spTransform(res, CRS("+proj=longlat +datum=WGS84 +init=epsg:4326"))
rgdal::writeOGR( rgdal::writeOGR(
res, obj = res,
layer = paste("SamplePoints_step_", step, "_", className, sep = ""), layer = paste("SamplePoints_step_", step, "_", className, sep = ""),
dsn = paste(inPath, "SamplePoints_step_", step, "_", className, ".shp", sep = ""), dsn = paste(inPath, "SamplePoints_step_", step, "_", className, ".shp", sep = ""),
driver = "ESRI Shapefile", driver = "ESRI Shapefile",
......
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/WriteOutSamples.r % Please edit documentation in R/WriteOutSamples.r
\name{WriteOutSamples} \name{writeOutSamples}
\alias{WriteOutSamples} \alias{writeOutSamples}
\title{Sample Collection for Habitat Types} \title{Sample Collection for Habitat Types}
\usage{ \usage{
WriteOutSamples(inPath, step, className, output_format = c("shp", "geojson")) writeOutSamples(inPath, step, className, output_format = c("shp", "geojson"))
} }
\arguments{ \arguments{
\item{inPath}{file path (character) for results of habitat type sampling and probability mapping (same as outPath from function multi_Class_Sampling)} \item{inPath}{file path (character) for results of habitat type sampling and probability mapping (same as outPath from function multi_Class_Sampling)}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment