rpygeo_search: Search for ArcPy functions and classes

Description Usage Arguments Details Value Author(s) Examples

View source: R/rpygeo_reticulate.R

Description

Search for ArcPy functions and classes with a character string or regular expression.

Usage

1
rpygeo_search(search_term = NULL)

Arguments

search_term

Search term. Regular expressions are possible.

Details

The list members are referenced by the ArcPy module names. Each member contains a character vector of matching ArcPy functions and classes. Except for the main module, functions and classes have to be accessed by their module names (s. examples).

Value

Named list of character vectors of matching ArcPy functions and classes

Author(s)

Marc Becker

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## Not run: 
# Load packages
library(RPyGeo)
library(magrittr)
library(RQGIS)

# Get data
data(dem, package = "RQGIS")

# Write data to disk
writeRaster(dem, file.path(tempdir(), "dem.tif"), format = "GTiff")

# Load the ArcPy module and build environment
arcpy <- rpygeo_build_env(overwrite = TRUE,
                          workspace = tempdir(),
                          extensions = "Spatial")

# Search for ArcPy functions, which contain the term slope
rpygeo_search("slope")

#> $toolbox
#> [1] "Slope_3d"        "SurfaceSlope_3d"
#>
#> $main
#> [1] "Slope_3d"        "SurfaceSlope_3d"
#>
#> $sa
#> [1] "Slope"
#>
#> $ddd
#> [1] "Slope"        "SurfaceSlope"

# Run function from sa module
arcpy$sa$Slope(in_raster="dem.tif")

# Run function from main module
arcpy$Slope_3d(in_raster="dem.tif")

## End(Not run)

RPyGeo documentation built on May 1, 2019, 6:48 p.m.