Skip to content

Commit dcf508a

Browse files
avoid warnings in sample_imbalance
1 parent 0fed3c4 commit dcf508a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

R/sits_sample_functions.R

+9-7
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,15 @@ sits_reduce_imbalance <- function(samples,
142142
# set the dimension of the SOM grid
143143
grid_dim <- ceiling(sqrt(n_samples_under / 4))
144144
# build the SOM map
145-
som_map <- sits_som_map(
146-
samples_cls,
147-
grid_xdim = grid_dim,
148-
grid_ydim = grid_dim,
149-
distance = "euclidean",
150-
rlen = 10,
151-
mode = "pbatch"
145+
som_map <- suppressWarnings(
146+
sits_som_map(
147+
samples_cls,
148+
grid_xdim = grid_dim,
149+
grid_ydim = grid_dim,
150+
distance = "euclidean",
151+
rlen = 10,
152+
mode = "pbatch"
153+
)
152154
)
153155
# select samples on the SOM grid using the neurons
154156
samples_under <- som_map[["data"]] |>

0 commit comments

Comments
 (0)