Skip to content

Commit 2337899

Browse files
authored
Merge pull request #17 from Permian-Global-Research/Fix-rcmd
Fix rcmd
2 parents 10c92ef + 8aed281 commit 2337899

7 files changed

+10
-8
lines changed

DESCRIPTION

+2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ Imports:
1818
grDevices,
1919
httr,
2020
lubridate,
21+
methods,
2122
purrr,
2223
reticulate (>= 1.41.0.1),
2324
rlang,
2425
rstac,
2526
scales,
27+
stats,
2628
withr,
2729
wk,
2830
xml2

R/plot-raster-src.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ plot_raster_src <- function(
3131
yaxs = "r",
3232
legend = if (nbands == 1) TRUE else FALSE,
3333
digits = 2,
34-
na_col = rgb(0, 0, 0, 0),
34+
na_col = grDevices::rgb(0, 0, 0, 0),
3535
...
3636
) {
37-
dpi <- dev.size("px")[1] / dev.size("in")[1]
37+
dpi <- grDevices::dev.size("px")[1] / grDevices::dev.size("in")[1]
3838
dev_inches <- graphics::par("din") # Returns c(width, height) in inches
3939
dev_size <- dev_inches * dpi
4040
target_divisor <- dev_size[1] * 1.5
4141

42-
ds <- new(gdalraster::GDALRaster, x)
42+
ds <- methods::new(gdalraster::GDALRaster, x)
4343
on.exit(if (ds$isOpen()) ds$close())
4444

4545
rxs <- ds$getRasterXSize()

R/vrt-block.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ build_vrt_block <- function(
2020
v_assert_valid_schema(x)
2121

2222
# read and verify and get attrs for modified VRT
23-
gdr <- new(gdalraster::GDALRaster, x)
23+
gdr <- methods::new(gdalraster::GDALRaster, x)
2424
ras_count <- gdr$getRasterCount()
2525
assets <- purrr::map_chr(
2626
seq_len(ras_count),

R/vrt-set-mask.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ vrt_set_maskfun.vrt_block <- function(
6060

6161
mskvrt <- fs::file_temp(tmp_dir = getOption("vrt.cache"), ext = "vrt")
6262
ts <- save_vrt(x)
63-
ds <- new(gdalraster::GDALRaster, ts)
63+
ds <- methods::new(gdalraster::GDALRaster, ts)
6464
band_files <- setdiff(ds$getFileList(), ds$getFilename())
6565
msk_file <- band_files[mask_idx]
6666

R/vrt-stack.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ build_vrt_stack <- function(
9292
# validate the vrt against the schema
9393
v_assert_valid_schema(x)
9494
# read and verify modified VRT
95-
gdr <- new(gdalraster::GDALRaster, x)
95+
gdr <- methods::new(gdalraster::GDALRaster, x)
9696
ras_count <- gdr$getRasterCount()
9797
assets <- purrr::map_chr(
9898
seq_len(ras_count),

man/plot_raster_src.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-py-install.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
test_that("python can be installed", {
22
expect_invisible(
3-
vrtility_py_require("numpy", "numba")
3+
vrtility_py_require(c("numpy", "numba"))
44
)
55
})
66

0 commit comments

Comments
 (0)