-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
with #6 since all examples explicitly tested
- Loading branch information
Showing
2 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
## Export raster and vectors of a grain to a specified directory | ||
tmpdir <- tempdir() | ||
export(grain(tinyPatchGOC, 2), dirname = "tiny_goc_thresh2", path = tmpdir) | ||
unlink(file.path(tmpdir, "tiny_goc_thresh2"), recursive = TRUE) | ||
|
||
## Export rasters and vectors of the MPG and place in an R object | ||
## Export rasters and vectors and place in an R object | ||
sp_tinyPatchGOC <- export(grain(tinyPatchGOC, 2), R = TRUE) # nolint | ||
sp_tinyPatchMPG <- export(tinyPatchMPG, R = TRUE) # nolint | ||
|
||
## Export raster and vectors to a specified directory | ||
exportPath <- tempdir() | ||
export(grain(tinyPatchGOC, 2), dirname = "tiny_goc_thresh2", path = exportPath) | ||
export(tinyPatchMPG, dirname = "tiny_mpg", path = exportPath, vorBound = TRUE) | ||
|
||
## clean up | ||
unlink(file.path(exportPath, "tiny_goc_thresh2"), recursive = TRUE) | ||
unlink(file.path(exportPath, "tiny_mpg"), recursive = TRUE) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.