Skip to content

Commit

Permalink
Quietly load sf namespace when loading sf objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemahoney218 committed Aug 8, 2023
1 parent 9a7f212 commit 0ec3ec4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,14 @@ st_sf = function(..., agr = NA_agr_, row.names,
st_agr(df) = agr
if (! missing(crs))
st_crs(df) = crs

attr(df, ".sf_namespace") <- .sf_namespace

df
}

.sf_namespace <- function() NULL

#' @name sf
#' @param x object of class \code{sf}
#' @param i record selection, see \link{[.data.frame}
Expand Down

0 comments on commit 0ec3ec4

Please sign in to comment.