Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to **GRASS** 8.4 #106

Merged
merged 125 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
b47a294
Update documentation
adamlilith Sep 27, 2024
348f00b
Update fasterRaster_workspace.code-workspace
adamlilith Sep 27, 2024
71b2537
Add `grass()`
adamlilith Sep 27, 2024
bc89ae8
Update pkgdown.yml
adamlilith Sep 27, 2024
48b6eb7
Add `grass()`
adamlilith Sep 27, 2024
9cbbb3b
Create addLocationProject.r
adamlilith Sep 27, 2024
87f369b
Remove `dissolve` argument
adamlilith Sep 27, 2024
b274747
Update for **GRASS 8.4**
adamlilith Sep 27, 2024
2f83781
Update buffer.r
adamlilith Sep 27, 2024
1652e0f
Specify `type` when calling `.ls()`
adamlilith Sep 27, 2024
e2b4c0b
Add `...` to sig `GR` & `GV`
adamlilith Sep 27, 2024
6599191
Add `grass()`
adamlilith Sep 27, 2024
36eba1a
Fix `levels` bug (user value was overwritten as `NULL`)
adamlilith Sep 27, 2024
a2c1cc8
Update ls.r
adamlilith Sep 27, 2024
3d20531
Add `grass()`
adamlilith Sep 27, 2024
a22ccb3
Revert to using `nprocs` when GRASS >= 8.3
adamlilith Sep 27, 2024
0cbc678
Better catch of unprojected CRSs and extent thereof
adamlilith Sep 27, 2024
3c6862e
Fix bug in call of `.rasterize()`
adamlilith Sep 27, 2024
73186d6
Revert to using `nprocs` when ver >=8.3
adamlilith Sep 27, 2024
817aeb9
Revert to using `nprocs` when ver >=8.3
adamlilith Sep 27, 2024
b63da89
Update
adamlilith Sep 27, 2024
49c1263
Add `reference` section
adamlilith Sep 28, 2024
a670c08
Update
adamlilith Sep 28, 2024
ffbbf71
Update res.r
adamlilith Sep 28, 2024
89acd9d
Update fasterRaster.r
adamlilith Sep 28, 2024
0b63c54
Update stretch.r
adamlilith Sep 28, 2024
e373e56
Update app.r
adamlilith Sep 28, 2024
42712de
Update addLocationProject.r
adamlilith Sep 28, 2024
6eb1e2b
Move `workDir()` to internal
adamlilith Sep 28, 2024
1b98ec6
Add test with `grassStarted()`
adamlilith Sep 28, 2024
1f951e2
Update as.lines.r
adamlilith Oct 1, 2024
b320c81
Fix missing `}`
adamlilith Oct 1, 2024
46a5a5d
Update _pkgdown.yml
adamlilith Oct 4, 2024
86e8888
Delete junk
adamlilith Oct 4, 2024
bf30785
Add `subset()`
adamlilith Oct 4, 2024
38eeb57
Add `init()`
adamlilith Oct 4, 2024
6b40965
Fix bug
adamlilith Oct 4, 2024
c4651cf
Add `subset()
adamlilith Oct 4, 2024
bf9b867
Update mow.r
adamlilith Oct 4, 2024
427c292
Add `negate` arg
adamlilith Oct 4, 2024
e80076a
Update fasterRaster.r
adamlilith Oct 4, 2024
debf201
Update fast.r
adamlilith Oct 4, 2024
7dc43c9
Fix bug swapping vector and raster!
adamlilith Oct 4, 2024
a923f6d
Update 08_logic.r
adamlilith Oct 4, 2024
68b2697
Add `anyNA()` and `allNA()`
adamlilith Oct 4, 2024
c8e2733
Split help
adamlilith Oct 4, 2024
1953972
Update 03_options.r
adamlilith Oct 4, 2024
8a08fa6
Update 02_defaults.r
adamlilith Oct 4, 2024
8370253
Update
adamlilith Oct 4, 2024
326bc55
Recover from GHD BSOD crash
adamlilith Oct 4, 2024
dbb99a6
Rename files and help files to coincide
adamlilith Oct 4, 2024
300f5ff
Update fasterRaster.r
adamlilith Oct 4, 2024
0794d98
Update
adamlilith Oct 4, 2024
9e885fa
Update DESCRIPTION
adamlilith Oct 4, 2024
abb89e8
Add `segregate()`
adamlilith Oct 4, 2024
b618e8f
Retain `levels` in output
adamlilith Oct 4, 2024
c3f97b9
Deprecate individual regression fxs; add `regress()`
adamlilith Oct 4, 2024
36d3a3c
Update segregate.r
adamlilith Oct 4, 2024
4a99856
Update madChelsa.r
adamlilith Oct 4, 2024
0829655
Update
adamlilith Oct 4, 2024
e0bec5e
`pca()` --> `princomp()`
adamlilith Oct 5, 2024
cb57e16
Better error
adamlilith Oct 5, 2024
765b1e2
Update combineCats.r
adamlilith Oct 5, 2024
6c8b861
Update combineCats.Rd
adamlilith Oct 5, 2024
cae26be
`combineCats()` --> `concats()
adamlilith Oct 5, 2024
d9976ff
Update
adamlilith Oct 5, 2024
85f2e55
Update pkgdown.yml
adamlilith Oct 5, 2024
89ff94d
Update
adamlilith Oct 5, 2024
fa452a9
pkgdown
adamlilith Oct 5, 2024
f16bec3
Update appFunsTable.rda
adamlilith Oct 6, 2024
69f9a38
Fix `appFuns()` so it opens shiny
adamlilith Oct 6, 2024
1754390
Create elev_rivers.png
adamlilith Oct 6, 2024
d9a5f55
Create dist_to_rivers.png
adamlilith Oct 6, 2024
6dfa14f
Remove all `sQuote()`
adamlilith Oct 6, 2024
840d00f
Update NEWS.md
adamlilith Oct 6, 2024
f913fb2
Update .Rbuildignore
adamlilith Oct 6, 2024
d0011fe
Update .gitignore
adamlilith Oct 6, 2024
4fbfbdb
Update fasterRaster.r
adamlilith Oct 6, 2024
feb9de9
Fix damned vignettes issues
adamlilith Oct 7, 2024
5cf372c
Add `grassHelp()`
adamlilith Oct 8, 2024
1dcd581
Change `grass()` to `grassGUI()`
adamlilith Oct 8, 2024
bbaf641
Fix bug when `fun = "regular"`
adamlilith Oct 8, 2024
bc38282
Add argument `keep`
adamlilith Oct 8, 2024
e364bf3
Add argument `keep`
adamlilith Oct 8, 2024
bc97375
Update NAMESPACE
adamlilith Oct 8, 2024
5a9cb60
Change URLs to `grassHelp()` calls
adamlilith Oct 8, 2024
8ab90e2
Update 01_generics.r
adamlilith Oct 8, 2024
b9e3a49
Update complete.cases.r
adamlilith Oct 8, 2024
f2af6f0
Update longlat.r
adamlilith Oct 8, 2024
399b237
Add progress bar
adamlilith Oct 8, 2024
b663b8f
Update locationRestore.r
adamlilith Oct 8, 2024
7e59d99
Update mow.Rd
adamlilith Oct 8, 2024
f4a81cb
Forgot `entry` arg
adamlilith Oct 8, 2024
8f4d8d6
Add `verbose`
adamlilith Oct 8, 2024
96a0a70
Different temp dir... `tempdir()` can fail
adamlilith Oct 8, 2024
cb7813b
Fix bug related to attaching db
adamlilith Oct 9, 2024
47eeb3a
Fix big in detecting column "cat"
adamlilith Oct 9, 2024
34ea991
Fix bug in how GRASS reports presence of db
adamlilith Oct 9, 2024
098e432
Update grassHelp.r
adamlilith Oct 9, 2024
bcc31db
Update hidden_functions.Rmd
adamlilith Oct 9, 2024
7848c42
Add juice
adamlilith Oct 9, 2024
860c14e
Update
adamlilith Oct 9, 2024
14585b3
Update ex_connectors.r
adamlilith Oct 9, 2024
1d4b4ad
Update ex_bioclims.r
adamlilith Oct 9, 2024
8439e8e
Update ex_asContour.r
adamlilith Oct 9, 2024
4dc9a16
Fix bug detecting output of `v.info`
adamlilith Oct 9, 2024
7f4610b
Update
adamlilith Oct 9, 2024
2ee25d4
Update ex_aggregate_disagg.r
adamlilith Oct 9, 2024
2e9d878
Update connectors.r
adamlilith Oct 10, 2024
e89f031
Fix bug parsing distance output from `v.distance`
adamlilith Oct 10, 2024
0899ce6
Require stronger response when `ask=T`
adamlilith Oct 10, 2024
edc28f8
Update ex_distance.r
adamlilith Oct 10, 2024
c2364d7
Update NEWS.md
adamlilith Oct 10, 2024
3feb3d3
Fix bug parsing `v.to.db`
adamlilith Oct 10, 2024
611fbe4
Update NEWS.md
adamlilith Oct 10, 2024
8ede09d
Update distance.Rd
adamlilith Oct 10, 2024
2b25416
Fix bug when `scratchDir = NULL`
adamlilith Oct 10, 2024
9d214df
Update NEWS.md
adamlilith Oct 10, 2024
4065555
Fix bug
adamlilith Oct 10, 2024
e9c94cb
Update NEWS.md
adamlilith Oct 10, 2024
e98f9ce
Update
adamlilith Oct 15, 2024
93abab9
Only work if `interactive()`
adamlilith Oct 15, 2024
c69f2ba
Update locationFind.r
adamlilith Oct 15, 2024
734fabf
`8.3.0.2027`!
adamlilith Oct 15, 2024
487c63c
Update NEWS.md
adamlilith Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ CODE_OF_CONDUCT.md
^\vignettes\^junk
junk
fasterRaster_workspace.code-workspace
^doc$
^Meta$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ docs
inst/doc
junk
/vignettes/junk
/doc/
/Meta/
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: fasterRaster
Type: Package
Title: Faster Raster and Spatial Vector Processing Using 'GRASS GIS'
Version: 8.3.0.7026
Date: 2024-09-22
Version: 8.3.0.7027
Date: 2024-10-15
Authors@R:
c(
person(
Expand Down Expand Up @@ -41,10 +41,10 @@ Suggests:
Roxygen: list(markdown = TRUE)
License: GPL (>=3) + file LICENSE
SystemRequirements: GRASS (>= 8)
URL: http://www.earthSkySea.org, https://adamlilith.github.io/fasterRaster/
URL: https://github.com/adamlilith/fasterRaster, https://adamlilith.github.io/fasterRaster/
BugReports: https://github.com/adamlilith/fasterRaster/issues
VignetteBuilder: knitr
Encoding: UTF-8
LazyData: true
LazyLoad: yes
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
18 changes: 11 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(appFuns)
export(fastData)
export(faster)
export(grassHelp)
export(grassInfo)
export(grassStarted)
export(is.polygons)
Expand Down Expand Up @@ -32,6 +33,7 @@ exportMethods("addCats<-")
exportMethods("addTable<-")
exportMethods("levels<-")
exportMethods("names<-")
exportMethods(.workDir)
exportMethods(Arith)
exportMethods(Compare)
exportMethods(E)
Expand All @@ -45,6 +47,8 @@ exportMethods(activeCat)
exportMethods(activeCats)
exportMethods(addCats)
exportMethods(aggregate)
exportMethods(allNA)
exportMethods(anyNA)
exportMethods(app)
exportMethods(appCheck)
exportMethods(as.contour)
Expand Down Expand Up @@ -73,11 +77,11 @@ exportMethods(classify)
exportMethods(clump)
exportMethods(clusterPoints)
exportMethods(colbind)
exportMethods(combineCats)
exportMethods(combineLevels)
exportMethods(compareGeom)
exportMethods(complete.cases)
exportMethods(compositeRGB)
exportMethods(concats)
exportMethods(connectors)
exportMethods(convHull)
exportMethods(cos)
Expand Down Expand Up @@ -117,13 +121,14 @@ exportMethods(freq)
exportMethods(geomorphons)
exportMethods(geomtype)
exportMethods(global)
exportMethods(grassGUI)
exportMethods(grid)
exportMethods(head)
exportMethods(hexagons)
exportMethods(hillshade)
exportMethods(hist)
exportMethods(horizonHeight)
exportMethods(intercept)
exportMethods(init)
exportMethods(interpIDW)
exportMethods(interpSplines)
exportMethods(intersect)
Expand Down Expand Up @@ -178,18 +183,18 @@ exportMethods(nrow)
exportMethods(nsubgeom)
exportMethods(nunique)
exportMethods(pairs)
exportMethods(pca)
exportMethods(plot)
exportMethods(plotRGB)
exportMethods(predict)
exportMethods(princomp)
exportMethods(project)
exportMethods(quantile)
exportMethods(r2)
exportMethods(rSpatialDepRast)
exportMethods(range)
exportMethods(rast)
exportMethods(rasterize)
exportMethods(rbind)
exportMethods(regress)
exportMethods(remove0)
exportMethods(removeAngles)
exportMethods(removeBridges)
Expand All @@ -211,13 +216,13 @@ exportMethods(sampleRast)
exportMethods(scale)
exportMethods(scalepop)
exportMethods(sdpop)
exportMethods(segregate)
exportMethods(selectRange)
exportMethods(show)
exportMethods(simplifyGeom)
exportMethods(sin)
exportMethods(sineRast)
exportMethods(skewness)
exportMethods(slope)
exportMethods(smoothGeom)
exportMethods(snap)
exportMethods(sources)
Expand All @@ -229,6 +234,7 @@ exportMethods(st_crs)
exportMethods(stdev)
exportMethods(streams)
exportMethods(stretch)
exportMethods(subset)
exportMethods(subst)
exportMethods(sum)
exportMethods(summary)
Expand All @@ -242,7 +248,6 @@ exportMethods(top)
exportMethods(topology)
exportMethods(trim)
exportMethods(trunc)
exportMethods(tvalue)
exportMethods(union)
exportMethods(unscale)
exportMethods(update)
Expand All @@ -254,7 +259,6 @@ exportMethods(voronoi)
exportMethods(wetness)
exportMethods(which.max)
exportMethods(which.min)
exportMethods(workDir)
exportMethods(writeRaster)
exportMethods(writeVector)
exportMethods(xor)
Expand Down
39 changes: 39 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# fasterRaster 8.4.0.7027 (2024-10-15)

### Main task for this version
o Test examples with **GRASS 8.4** and update functions as needed. Upgrade to **fasterRaster** 8.4.X.X.

### Updates for **GRASS 8.4**
o `addLocationProject()` adds either a `project` or `location` argument to a `list` to be passed to `rgrass::execGRASS()`.
o `project()` work with **GRASS** 8.4.
o `.vAttachDatabase()` no longer has the `"o"` flag when calling `v.db.connect` when running **GRASS** >=8.4.

### Potentially code-breaking changes
o `aggregate()` no longer has the `dissolve` argument for `GVector`s (polygons will always be dissolved).
o `combineCats()` has been renamed `concats()` to align with **terra**.
o `intercept()`, `slope()`, `r2()`, and `tvalue()` have been replaced by the single function `regress()` to align with **terra**.
o `pca()` has been renamed `princomp()`.

### Enhanced functionality and new functions
o `extract()` now automatically projects a `GVector` to match the CRS of a `GRaster` from which extraction is being made.
o `grassGUI()` allows users to start the **GRASS** GUI.
o `grassHelp()` shows the manual page for a **GRASS** module.
o `layerIndex()` allows a `negate` argument to get the "opposite" indices of a `GRaster`.
o `init()` assigns to `GRaster` cells the value of their coordinates, rows, columns, or values in a regular or chessboard-like pattern.
o `regress()` replaces individual functions `intercept()`, `slope()`, `r2()`, and `tvalue()`.
o `subset()` subsets layers of a `GRaster` or rows/geometries of a `GVector`.
o `segregate()` creates one layer per unique value in an input `GRaster`, with values in the output coded 1 or 0 depending on whether cells in the input had the unique value or not.

### Bug and issue fixes
o `appFuns()` succeeds in opening a **shiny** table with `app()` functions.
o `categories()` correctly assigns active category column.
o `crds()` correctly returns coordinates from a "points" `GVector`.
o `distance()` correctly parses distance matrix.
o `simplifyGeom()` works for 2-dimensional `GVector`s.
o `flow()` creates a scratch folder when none is provided.
o `global()` does not fail when multiple values of `fun` and `probs` are used and `fun` includes `quantile`.
o `rasterize()` works when `by` is not `NULL`.
o `.layerIndex()` (called by `categories()` and other functions related to categorical `GRaster`s) does not fail.
o `.vHasDatabase()` correctly detects if a vector has a database attached to it.
o Removed all instances of `sQuote()`.

# fasterRaster 8.3.0.7026 (2024-09-22)

o Recompile `pkgdown`
Expand Down
4 changes: 2 additions & 2 deletions R/00b_GSpatial_class.r
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ methods::setValidity("GSpatial",
} else if (length(object@crs) != 1L) {
"@crs can only be a single character string."
} else if (!all(object@topology %in% c(NA_character_, "2D", "3D"))) {
paste0("@topology can only be a NA, ", sQuote("2D"), ", or ", sQuite("3D"), ".")
paste0("@topology can only be a NA, `2D` or `3D`.")
} else if (object@topology == "3D" && any(is.na(object@zextent))) {
paste0("@topology is ", sQuote("3D"), " but @zextent has at least one NA value.")
paste0("@topology is `3D` but @zextent has at least one NA value.")
} else if (!anyNA(object@zextent[1L]) & is.na(object@zextent[2L]) | (is.na(object@zextent[1L]) & !is.na(object@zextent[2L]))) {
"Both values of @zextent must be NA or must be numeric values."
} else if (!anyNA(object@zextent) && object@zextent[2L] < object@zextent[1L]) {
Expand Down
2 changes: 1 addition & 1 deletion R/00c_GRegion_class.r
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Classes for "fasterRaster" locations, rasters, and vectors#'
#' @title Classes for "fasterRaster" locations, rasters, and vectors
#'
#' @aliases GRegion
#' @rdname GLocation
Expand Down
2 changes: 1 addition & 1 deletion R/00d_GRaster_class.r
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ GRaster <- methods::setClass(
methods::setValidity("GRaster",
function(object) {
if (!all(object@datatypeGRASS %in% c("CELL", "FCELL", "DCELL"))) {
paste0("@datatypeGRASS can only be NA, ", sQuote("CELL"), ", ", sQuote("FCELL"), ", or ", sQuote("DCELL"), ".")
paste0("@datatypeGRASS can only be NA, ``CELL`, `FCELL`, or `DCELL`.")
} else if (!is.na(object@dimensions[3L]) && object@dimensions[3L] <= 0L) {
"Third value in @dimensions must be NA or a positive integer."
} else if (!is.na(object@resolution[3L]) && object@resolution[3L] <= 0) {
Expand Down
4 changes: 2 additions & 2 deletions R/00e_GVector_class.r
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ methods::setValidity("GVector",
if (!info$catsValid) {
"Vector has invalid topology. See the *Details* section in `fast()` on how to correct topology."
} else if (!all(object@geometry %in% c(NA_character_, "points", "lines", "polygons"))) {
paste0("@geometry can only be NA, ", sQuote("points"), ", ", sQuote("lines"), ", or ", sQuote("polygons"), ".")
paste0("@geometry can only be NA, `points`, `lines`, or `polygons`.")
# } else if (length(unique(.vCats(object)) != object@nGeometries)) {
# "The number of @nGeometries is not the same as the number of unique ", sQuote("cat"), " values in the vector attribute table in GRASS."
# "The number of @nGeometries is not the same as the number of unique `cat` values in the vector attribute table in GRASS."
# } else if (object@nGeometries > object@nSubgeometries) {
# "The number of sub-geometries in @nSubgeometries must be <= the number of geometries in @nGeometries."
} else if (object@nGeometries == 0L) {
Expand Down
18 changes: 10 additions & 8 deletions R/01_generics.r
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ methods::setGeneric(name = "addCats", package = "terra")
methods::setGeneric(name = "addCats<-", def = function(x, ..., value) standardGeneric("addCats<-"))
methods::setGeneric(name = "addTable<-", def = function(x, ..., value) standardGeneric("addTable<-"))
# methods::setGeneric(name = "andAndAnd", def = function(e1, e2) standardGeneric("andAndAnd"))
methods::setGeneric(name = "allNA", package = "terra")
# anyNA: generic is implicit
methods::setGeneric(name = "app", package = "terra")
# methods::setGeneric(name = "appFuns", def = function(x, ...) standardGeneric("appFuns"))
methods::setGeneric(name = "appCheck", def = function(x, fun, ...) standardGeneric("appCheck"))
Expand Down Expand Up @@ -102,8 +104,8 @@ methods::setGeneric(name = "clusterPoints", def = function(x, ...) standardGener
methods::setGeneric(name = "compareGeom", package = "terra")
methods::setGeneric("complete.cases", function(...) standardGeneric("complete.cases"), package = "stats")
methods::setGeneric(name = "compositeRGB", def = function(r, ...) standardGeneric("compositeRGB"))
methods::setGeneric(name = "combineCats", def = function(x, ...) standardGeneric("combineCats"))
methods::setGeneric(name = "combineLevels", def = function(x, ...) standardGeneric("combineLevels"))
methods::setGeneric(name = "concats", def = function(x, ...) standardGeneric("concats"))
methods::setGeneric(name = "connectors", def = function(x, y, ...) standardGeneric("connectors"))
methods::setGeneric(name = "convHull", package = "terra")
methods::setGeneric(name = "count", def = function(x, ...) standardGeneric("count"))
Expand Down Expand Up @@ -147,6 +149,7 @@ methods::setGeneric(name = "fragmentation", def = function(x, ...) standardGener
methods::setGeneric(name = "geomtype", package = "terra")
methods::setGeneric(name = "geomorphons", def = function(x, ...) standardGeneric("geomorphons"))
methods::setGeneric(name = "global", package = "terra")
methods::setGeneric(name = "grassGUI", def = function(x, ...) standardGeneric("grassGUI"))
methods::setGeneric(name = "grid", def = function(x, ...) standardGeneric("grid"))

methods::setGeneric(name = "head", package = "utils")
Expand All @@ -155,8 +158,8 @@ methods::setGeneric(name = "hillshade", def = function(x, ...) standardGeneric("
methods::setGeneric(name = "hist", package = "terra")
methods::setGeneric(name = "horizonHeight", def = function(x, ...) standardGeneric("horizonHeight"))

methods::setGeneric(name = "init", package = "terra")
methods::setGeneric(name = "intersect", package = "terra")
methods::setGeneric(name = "intercept", def = function(x, ...) standardGeneric("intercept"))
methods::setGeneric(name = "interpIDW", package = "terra")
methods::setGeneric(name = "interpSplines", def = function(x, y, ...) standardGeneric("interpSplines"))
methods::setGeneric(name = "is.2d", def = function(x) standardGeneric("is.2d"))
Expand Down Expand Up @@ -218,17 +221,15 @@ methods::setGeneric(name = "nunique", def = function(x, ...) standardGeneric("nu
methods::setGeneric(name = "reorient", def = function(x, ...) standardGeneric("reorient"))

methods::setGeneric(name = "pairs", package = "terra")
methods::setGeneric(name = "pca", def = function(x, ...) standardGeneric("pca"))
methods::setGeneric(name = "plot", package = "terra")
methods::setGeneric(name = "plotRGB", package = "terra")
methods::setGeneric(name = "predict", package = "terra")
# methods::setGeneric(name = "print", def = function(x, ...) standardGeneric("print")) # base
methods::setGeneric(name = "princomp", package = "terra")
methods::setGeneric(name = "print") # base
methods::setGeneric(name = "project", package = "terra")

methods::setGeneric(name = "quantile", package = "terra")

methods::setGeneric(name = "r2", def = function(x, ...) standardGeneric("r2"))
methods::setGeneric(name = "rast", package = "terra")
methods::setGeneric(name = "rasterize", package = "terra")
# methods::setGeneric(name = "rbind")
Expand All @@ -237,6 +238,7 @@ methods::setGeneric(name = "rasterize", package = "terra")
methods::getGeneric("rbind")
methods::setGeneric(name = "rbind", signature = "...")

methods::setGeneric(name = "regress", package = "terra")
methods::setGeneric(name = "remove0", def = function(x, ...) standardGeneric("remove0"))
methods::setGeneric(name = "removeAngles", def = function(x, ...) standardGeneric("removeAngles"))
methods::setGeneric(name = "removeBridges", def = function(x, ...) standardGeneric("removeBridges"))
Expand All @@ -259,12 +261,12 @@ methods::setGeneric(name = "scale", package = "terra")
methods::setGeneric(name = "scalepop", def = function(x, ...) standardGeneric("scalepop"))
methods::setGeneric(name = "sdpop", def = function(x, ...) standardGeneric("sdpop"))
methods::setGeneric(name = "selectRange", def = function(x, ...) standardGeneric("selectRange"))
methods::setGeneric(name = "segregate", def = function(x, ...) standardGeneric("segregate"))
methods::setGeneric(name = "show", package = "methods")
methods::setGeneric(name = "simplifyGeom", package = "terra")
methods::setGeneric(name = "sineRast", def = function(x, ...) standardGeneric("sineRast"))
methods::setGeneric(name = "smoothGeom", def = function(x, ...) standardGeneric("smoothGeom"))
methods::setGeneric(name = "skewness", def = function(x, ...) standardGeneric("skewness"))
methods::setGeneric(name = "slope", def = function(x, ...) standardGeneric("slope"))
methods::setGeneric(name = "snap", package = "terra")
methods::setGeneric(name = "sources", package = "terra")
methods::setGeneric(name = "spatSample", package = "terra")
Expand All @@ -278,6 +280,7 @@ methods::setGeneric(name = "st_buffer", package = "sf")
methods::setGeneric(name = "st_crs", package = "sf")
# methods::setGeneric(name = "st_distance", package = "sf")
methods::setGeneric(name = "stdev", package = "terra")
methods::setGeneric(name = "subset", package = "terra")
methods::setGeneric(name = "subst", package = "terra")
methods::setGeneric(name = "summary", def = function(object, ...) standardGeneric("summary"))

Expand All @@ -288,7 +291,6 @@ methods::setGeneric(name = "tiles", def = function(x, ...) standardGeneric("tile
methods::setGeneric(name = "top", def = function(x, ...) standardGeneric("top"))
methods::setGeneric(name = "topology", def = function(x, ...) standardGeneric("topology"))
methods::setGeneric(name = "trim", package = "terra")
methods::setGeneric(name = "tvalue", def = function(x, ...) standardGeneric("tvalue"))

methods::setGeneric(name = "update", package = "terra")
methods::setGeneric(name = "union", package = "terra")
Expand All @@ -299,9 +301,9 @@ methods::setGeneric(name = "vegIndex", def = function(x, ...) standardGeneric("v
methods::setGeneric(name = "vect", package = "terra")
methods::setGeneric(name = "voronoi", package = "terra")

methods::setGeneric(name = ".workDir", def = function(x, ...) standardGeneric(".workDir"))
methods::setGeneric(name = "W", def = function(x, ...) standardGeneric("W"))
methods::setGeneric(name = "wetness", def = function(x, ...) standardGeneric("wetness"))
methods::setGeneric(name = "workDir", def = function(x, ...) standardGeneric("workDir"))
methods::setGeneric(name = "writeRaster", package = "terra")
methods::setGeneric(name = "writeVector", package = "terra")

Expand Down
3 changes: 2 additions & 1 deletion R/02_defaults.r
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# global PUBLIC options
.grassDirDefault <- function() NA_character_
.addonsDirDefault <- function() NA_character_
.workDirDefault <- function() file.path(omnibus::forwardSlash(tempdir()))
# .workDirDefault <- function() file.path(omnibus::forwardSlash(tempdir()), omnibus::rstring(1))
.workDirDefault <- function() omnibus::forwardSlash(tempdir())

.locationDefault <- function() "default"
# .mapsetDefault <- function() "PERMANENT"
Expand Down
8 changes: 4 additions & 4 deletions R/03_options.r
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#' Options include:
#'
#' * `grassDir` (character): The folder in which **GRASS** is installed on your computer. Typically, this option is set when you run [faster()]. Depending on your operating system, your install directory will look something like this:
#' * Windows: `"C:/Program Files/GRASS GIS 8.3"`
#' * Mac OS: `"/Applications/GRASS-8.3.app/Contents/Resources"`
#' * Windows: `"C:/Program Files/GRASS GIS 8.4"`
#' * Mac OS: `"/Applications/GRASS-8.4.app/Contents/Resources"`
#' * Linux: `"/usr/local/grass"`
#'
#' * `addonsDir` (character): Folder in which **GRASS** addons are stored. If `NA` and `grassDir` is not `NA`, this will be assumed to be `file.path(grassDir, "addons")`. The default values is `NA`.
Expand All @@ -28,13 +28,13 @@
#'
#' * `memory` (integer/numeric): The amount of memory to allocate to a task, in GB, for **GRASS**. The default is 2048 MB (i.e., 2 GB). Some **GRASS** modules can take advantage of more memory.
#'
#' * `clean` (logical): If `TRUE` (default), remove temporary files created internally by functions. If not deleted, they can eventually fill up hard drive space, but deleting them takes a little bit of time (usually <1 second for each function).
#' * `clean` (logical): If `TRUE` (default), remove temporary files created internally by functions. If not deleted, they can eventually fill up hard drive space, but deleting them takes a little bit of time (usually <1 second for each function). See also [mow()].
#'
#' * `useDataTable` (logical): If `FALSE` (default), functions that return tabular output produce `data.frame`s. If `TRUE`, output will be `data.table`s from the **data.table** package. This can be much faster, but it might require you to know how to use `data.table`s if you want to manipulate them in **R**. You can always convert them to `data.frame`s using [base::as.data.frame()].
#'
#' * `verbose` (logical): If `TRUE`, show **GRASS** messages and otherwise hidden slots in classes. This is mainly used for debugging, so most users will want to keep this at its default, `FALSE`.
#'
#' * `workDir` (character): The folder in which **GRASS** rasters, vectors, and other objects are created and manipulated. By default, this is given by [tempdir()].
#' * `workDir` (character): The folder in which **GRASS** rasters, vectors, and other objects are created and manipulated. By default, this is given by [tempdir()]. Note that on some systems, changing the default folder to somewhere else can cause problems with **fasterRaster** being able to find rasters in **GRASS** that have been created.
#'
#' @param restore Logical: If `TRUE`, the all options will be reset to their default values. The default is `FALSE`.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/04_arithmetic.r
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#'
#' @return A `GRaster`.
#'
#' @example man/examples/ex_GRaster_arithmetic.r
#' @example man/examples/ex_GRaster_arithmetic_by_layer.r
#'
#' @aliases Arith
#' @rdname Arithmetic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#'
#' @returns A `GRaster`.
#'
#' @example man/examples/ex_GRaster_arithmetic.r
#' @example man/examples/ex_GRaster_arithmetic_by_layer.r
#'
#' @aliases is.na
#' @rdname math
Expand Down
Loading
Loading