Skip to content

Commit

Permalink
Correct argument name (data -> x) for as_sf_class
Browse files Browse the repository at this point in the history
  • Loading branch information
elipousson committed Oct 9, 2024
1 parent d040e8b commit 92d4e75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/as_sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ as_sf <- function(x,
is_sf_list(x) ~ "sf_list",
is_geo_coords(x) ~ "geo_coords",
ext && is.data.frame(x) ~ "data.frame",
# FIXME: Is there any better way of testing an address than just confirming it is a character?
# FIXME: Is there any better way of testing an address than just
# confirming it is a character?
ext && is.character(x) ~ "address",
is_raster(x) ~ "raster",
TRUE ~ "other"
Expand Down Expand Up @@ -213,7 +214,7 @@ try_st_as_sfc <- function(x, ..., call = caller_env()) {

#' Convert data to a different class
#'
#' @param data Data that can be converted to sf, sfc, bbox or a sf list object.
#' @param x Object to convert to an sf, sfc, bbox or a sf list object.
#' @param class A class to convert data to; defaults to NULL (which returns
#' "sf")
#' @param allow_null For [as_sf_class], if class is `NULL` and allow_null is `TRUE`,
Expand Down

0 comments on commit 92d4e75

Please sign in to comment.