Skip to contents

edit_data_frame applies edits that a user has made to data rendered in a DataTables object in a web browser to the underlying (sf) data frame on the server.

Usage

edit_data_frame(tmp_edits, df_to_edit, df_to_edit_not_sf, layer)

Arguments

tmp_edits

data frame storing the edits that a user has made to values in a DataTables object in their UI.

df_to_edit

Data frame or spatial data frame (sf) representing the layer in GeoPackage that is rendered in the DataTables object which the user edits will be applied to.

df_to_edit_not_sf

Data frame representing the layer in GeoPackage (i.e. df_to_edit) with the sf geometry object dropped (this can be done using st_drop_geometry).

layer

single element character vector of the name of layer in the GeoPackage that edits are applied to.

Value

A two-element list. The first element is the data frame with edits applied to it. The second element is a log recording the status of attempts to apply user edits to the underlying data frame object.

Details

This function is designed to be used in Shiny applications to support interactive cleaning of attribute data in GeoPackages.