Skip to content

Commit dba4dac

Browse files
authored
Merge pull request giotto-suite#327 from josschavezf/dev
fix recommendations from BiocCheck::BiocCheck()
2 parents b73ac46 + 00ef247 commit dba4dac

6 files changed

Lines changed: 20 additions & 20 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Encoding: UTF-8
2626
Roxygen: list(markdown = TRUE)
2727
RoxygenNote: 7.3.3
2828
Depends:
29-
R (>= 4.4.0)
29+
R (>= 4.5.0)
3030
Imports:
3131
checkmate,
3232
data.table (>= 1.12.2),

R/combine_metadata.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,10 @@ calculateLabelProportions <- function(gobject, labels,
695695
), call. = FALSE)
696696
}
697697

698-
spat_unit = set_default_spat_unit(
698+
spat_unit <- set_default_spat_unit(
699699
gobject = gobject, spat_unit = spat_unit
700700
)
701-
feat_type = set_default_feat_type(
701+
feat_type <- set_default_feat_type(
702702
gobject = gobject, spat_unit = spat_unit, feat_type = feat_type
703703
)
704704

@@ -881,7 +881,7 @@ calculateLabelProportions <- function(gobject, labels,
881881
sn <- sn[, c("source", "target")] # drop weights info if any
882882
} else if (!"weight" %in% colnames(sn) || isFALSE(weights)) {
883883
warning(wrap_txt("No 'weight' information present in spatial network.
884-
Using adjacency instead."), call. = FALSE)
884+
Using adjacency instead."), call. = FALSE)
885885
sn[, "weight" := 1] # fallback if no weight info exists
886886
}
887887
# ensure unique

R/data_evaluation.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ evaluate_input <- function(type, x, ...) {
152152
.gstop(
153153
"expression input needs to be a path to matrix-like data or an",
154154
"object of class 'Matrix', 'data.table', 'data.frame', 'matrix'",
155-
"'DelayedMatrix' or 'dbSparseMatrix'."
155+
"'DelayedMatrix' or 'dbSparseMatrix'."
156156
)
157157
}
158158

@@ -321,7 +321,7 @@ evaluate_input <- function(type, x, ...) {
321321
rnames <- rownames(x)
322322
if (!is.null(rnames)) {
323323
vmsg(.v = verbose, "[spatlocs] matrix input has rownames.
324-
Using these as IDs.")
324+
Using these as IDs.")
325325
dt[, id := rnames]
326326
}
327327
.evaluate_spatial_locations(dt, verbose = verbose, ...)

R/images.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2850,7 +2850,7 @@ to_simple_tif <- function(input_file,
28502850
unlink(outpath, force = TRUE) # if overwrite, delete original
28512851
} else {
28522852
stop("File already exists: ", outpath,
2853-
"\nSet overwrite = TRUE to replace.\n",
2853+
"\nSet overwrite = TRUE to replace.\n",
28542854
call. = FALSE
28552855
)
28562856
}

R/spatial_query.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ spatQuery <- function(gobject,
177177
if (!is.null(name)) checkmate::assert_character(name)
178178
checkmate::assert_list(filters,
179179
types = c("character", "giottoPolygon", "spatLocsObj", "numeric",
180-
"integer", "SpatVector")
180+
"integer", "SpatVector")
181181
)
182182
checkmate::assert_character(use_centroids, null.ok = TRUE)
183183
checkmate::assert_numeric(buffer)
@@ -190,29 +190,29 @@ spatQuery <- function(gobject,
190190
# more specific checks on inputs ----------------------------------- #
191191
if (length(filters) < 2L) {
192192
stop(wrap_txt("At least two elements in filters are needed."),
193-
call. = FALSE)
193+
call. = FALSE)
194194
}
195195
# `filters` input must be named.
196196
filter_names <- names(filters)
197197
if (any(vapply(filter_names, is_empty_char, FUN.VALUE = logical(1L)))) {
198198
stop(wrap_txt("All elements in filters list must be named"),
199-
call. = FALSE)
199+
call. = FALSE)
200200
}
201201
if (!is.null(use_centroids)) {
202202
if (!all(use_centroids %in% filter_names)) {
203203
stop("all entries in `use_centroids` must be names in `filters`\n",
204-
call. = FALSE)
204+
call. = FALSE)
205205
}
206206
}
207207
if (length(buffer) > 1L) {
208208
buffer_names <- names(buffer)
209209
if (is.null(buffer_names)) {
210210
stop("if multiple `buffer` values given, they must be named\n",
211-
call. = FALSE)
211+
call. = FALSE)
212212
}
213213
if (!all(buffer_names %in% filter_names)) {
214214
stop("all names for `buffer` values must be names in `filters`\n",
215-
call. = FALSE)
215+
call. = FALSE)
216216
}
217217
}
218218

@@ -334,7 +334,7 @@ spatQuery <- function(gobject,
334334
# not allowed.
335335
stop(wrap_txtf(
336336
"'%s' is not the last layer of query.
337-
Assigned 'buffer' may not be 0", fname
337+
Assigned 'buffer' may not be 0", fname
338338
), call. = FALSE)
339339
}
340340
}
@@ -355,7 +355,7 @@ spatQueryGiottoPolygons <- spatQuery
355355

356356
.squery_get_sv.default <- function(x, ...) {
357357
stop(wrap_txt("[spatQuery] unrecognized filter input type:", class(x)),
358-
call. = FALSE)
358+
call. = FALSE)
359359
}
360360

361361
.squery_get_sv.character <- function(x, gobject, centroids, spat_unit, ...) {
@@ -429,7 +429,7 @@ spatQueryGiottoPolygons <- spatQuery
429429

430430
if (is.null(sv)) {
431431
stop(sprintf("Requested filter '%s' not found in giotto object\n", x),
432-
call. = FALSE)
432+
call. = FALSE)
433433
}
434434

435435
# filter by x if needed

man/names.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)