View source: R/drop_geometry_column.R
| drop_geometry_column | R Documentation |
geometry Column From sf DataframesRemove geometry column from sf objects
drop_geometry_column(df = NULL, quiet = FALSE, ...)
df |
(required; dataframe, tibble, or sf) A dataframe with responses
(optional) and predictors. Must have at least 10 rows for pairwise
correlation analysis, and |
quiet |
(optional; logical) If FALSE, messages are printed. Default: FALSE. |
... |
(optional) Internal args (e.g. |
dataframe
Blas M. Benito, PhD
Other argument_validation:
validate_arg_df(),
validate_arg_df_not_null(),
validate_arg_encoding_method(),
validate_arg_f(),
validate_arg_function_name(),
validate_arg_max_cor(),
validate_arg_max_vif(),
validate_arg_predictors(),
validate_arg_preference_order(),
validate_arg_quiet(),
validate_arg_responses()
data(vi_smol)
#creating fake geometry column without sf loaded
vi_smol$geometry <- NA
attr(
x = vi_smol,
which = "sf_column"
) <- "geometry"
#check new attribute
attributes(vi_smol)$sf_column
#drop geometry column
df <- drop_geometry_column(
df = vi_smol
)
#checking that the geometry was droppped
"geometry" %in% colnames(df)
attributes(df)$sf_column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.