data_edit | R Documentation |
codedata_edit is a shiny application built on rhandsontable
that is
designed to make it easy to interactively view, enter or edit data without
any coding. data_edit
is also a wrapper for any reading or writing
function to make it easy to interactively update data saved to file.
data_edit( x = NULL, col_bind = NULL, col_edit = TRUE, col_options = NULL, col_stretch = FALSE, col_factor = FALSE, col_names = TRUE, col_readonly = NULL, row_bind = NULL, row_edit = TRUE, save_as = NULL, title = NULL, logo = NULL, logo_size = 30, logo_side = "left", viewer = "dialog", viewer_height = 800, viewer_width = 1200, theme = "yeti", read_fun = "read.csv", read_args = NULL, write_fun = "write.csv", write_args = NULL, quiet = FALSE, hide = FALSE, code = FALSE, ... )
x |
a matrix, data.frame, data.table or the name of a csv file to edit.
Tibbles are also supported but will be coerced to data.frames. An empty
table can be created by specifying the dimensions in a vector of the form
|
col_bind |
additional columns to add to the data prior to loading into editor, can be either an array containing the new data, a vector containing the new column names for empty columns or a named list containing a vector for each new column. |
col_edit |
logical indicating whether columns can be added or removed, set to TRUE by default. |
col_options |
named list containing the options for columns that use dropdown menus, dates, checkboxes or passwords. |
col_stretch |
logical indicating whether columns should be stretched to fill the full width of the display, set to FALSE by default. |
col_factor |
logical indicating whether character columns should be converted to factors prior to returning the edited data, set to FALSE by default. |
col_names |
logical indicating whether column names can be edited or a vector of column names that cannot be edited, set to TRUE by default to allow editing of column names. |
col_readonly |
names of columns that cannot be edited. Users will be able to edit values but these will be reverted to the original values. Column names for these column cannot be edited either. |
row_bind |
additional rows to add to the data prior to loading into editor, can be either an array containing the new data, a vector containing the new row names for empty rows or a named list containing a vector for each new column. |
row_edit |
logical indicating whether rows can be added or removed, set to TRUE by default. |
save_as |
name of a csv file to which the edited data should be saved. |
title |
optional title to include above the data editor. |
logo |
optional package logo to include in title above the data editor, must be supplied as path to logo png. |
logo_size |
width of the logo in pixels, set to 30 pixels by default. |
logo_side |
can be either |
viewer |
can be either |
viewer_height |
numeric to control the height of the viewer in pixels
when |
viewer_width |
numeric to control the width of the viewer in pixels when
|
theme |
valid shinytheme name, set to "yeti" by default. |
read_fun |
name of the function to use to read in the data when |
read_args |
a named list of additional arguments to pass to
|
write_fun |
name of the function to use to write the edited version of
|
write_args |
a named list of additional arguments to pass to
|
quiet |
logical indicating whether messages should be suppressed, set to FALSE by default. |
hide |
logical indicating whether the |
code |
logical indicating whether the code required to generate the
edited data should be printed to the console, set to |
... |
not in use. |
the edited data as a matrix or data.frame.
Dillon Hammill, Dillon.Hammill@anu.edu.au
if(interactive()) { data_edit(mtcars) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.