Skip to content

Commit 7e5cb6b

Browse files
committed
Added imported package names to functions where it was missing.
1 parent b7a25df commit 7e5cb6b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

R/download_terrain_variables.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ download_terrain_variables <- function(bbox,
6262
# -----------------
6363
# Reproject
6464

65-
terrain_raster_reproject <- terra::project(terrain_raster, y = crs(paste0("epsg:", proj_epsg)))
65+
terrain_raster_reproject <- terra::project(terrain_raster, y = terra::crs(paste0("epsg:", proj_epsg)))
6666

6767
# -----------------
6868
# Change resolution

R/make_basin_raster.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ make_basin_raster <- function(work_folder,
6767
# Set crs as WGS84 (EPSG: 4326)
6868
sf::st_crs(pour_point) <- 4326
6969
# Change projection to UTM
70-
pour_point <- sf::st_transform(pour_point, crs = st_crs(proj_epsg))
70+
pour_point <- sf::st_transform(pour_point, crs = sf::st_crs(proj_epsg))
7171
# Save pour point so it can be imported to whitebox functions
7272
pour_point_file <- file.path(work_folder, "pour_point.shp")
7373
sf::st_write(pour_point, pour_point_file, delete_dsn = TRUE)
@@ -108,9 +108,9 @@ make_basin_raster <- function(work_folder,
108108
snap_dist = snap_dist)
109109

110110
# Create basin file
111-
wbt_watershed(d8_pntr = d8_pointer,
112-
pour_pts = pour_point_snapped,
113-
output = basin)
111+
whitebox::wbt_watershed(d8_pntr = d8_pointer,
112+
pour_pts = pour_point_snapped,
113+
output = basin)
114114

115115
# -----------------
116116
# Save a map showing pour point adjustment

R/make_landscape_rasters.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ make_landscape_rasters <- function(dem,
4545
patch_method = "simple"){
4646

4747
# Check that whitebox is loaded
48-
if (check_whitebox_binary() == FALSE){stop("Whitebox not detected.")}
48+
if (whitebox::check_whitebox_binary() == FALSE){stop("Whitebox not detected.")}
4949

5050
# Check that work folder exists. If it doesn't, then make it, if possible.
5151
if(!dir.exists(work_folder)){dir.create(work_folder)}

0 commit comments

Comments
 (0)