Skip to content

Commit

Permalink
adjust focs
Browse files Browse the repository at this point in the history
  • Loading branch information
OldLipe committed Mar 11, 2025
1 parent f4f4947 commit d3c8a10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions R/sits_texture.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,21 +210,21 @@ sits_texture.raster_cube <- function(cube, ...,

#' @rdname sits_texture
#' @export
sits_texture.derived_cube <- function(data, ...) {
sits_texture.derived_cube <- function(cube, ...) {
stop(.conf("messages", "sits_texture_derived_cube"))
}
#' @rdname sits_texture
#' @export
sits_texture.default <- function(data, ...) {
data <- tibble::as_tibble(data)
if (all(.conf("sits_cube_cols") %in% colnames(data))) {
data <- .cube_find_class(data)
} else if (all(.conf("sits_tibble_cols") %in% colnames(data))) {
class(data) <- c("sits", class(data))
sits_texture.default <- function(cube, ...) {
cube <- tibble::as_tibble(cube)
if (all(.conf("sits_cube_cols") %in% colnames(cube))) {
cube <- .cube_find_class(cube)
} else if (all(.conf("sits_tibble_cols") %in% colnames(cube))) {
class(cube) <- c("sits", class(cube))
} else {
stop(.conf("messages", "sits_texture_default"))
}

acc <- sits_texture(data, ...)
acc <- sits_texture(cube, ...)
return(acc)
}
4 changes: 2 additions & 2 deletions man/sits_texture.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d3c8a10

Please sign in to comment.