The new row or column names must be unique! data_edit(mtcars) As outlined above, the row names will appear within the table so that the row indices can be displayed on the left-hand side. Simply select the cell that you want to edit and update its value within the table. data_edit(mtcars)ĭata_edit() has full support for editing row and column names. This will display a context menu with the options to add or remove rows or columns. Rows or columns can be added to the data from within the data editor by right clicking on a cell within the table. We will explore the use of each of these tools below: 3.1 Addition or removal of rows or columns #> Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1ĭata_edit() uses the dataEdit module to provide a variety of interactive data manipulation tools to edit your data. mtcars mpg cyl disp hp drat wt qsec vs am gear carb If you need to pass any additional arguments to your reading function, these can be supplied as a named list to the read_args argument. By default data_edit() will use read.csv from the utils package to read in files, but this can be changed to any reading function by supplying the name of the function to the read_fun argument. Data Importĭata_edit() uses the dataInput module to read in any form of tabular data from file for viewing and editing. If you wish to cancel all changes made to the data, you can select the Cancel button in the top left corner and the unedited data will be returned. Once you are finished exploring the data, you can close the data editor by hitting the Done button in the top right corner. The data editor will automatically move row names inside the table so that the row indices can be displayed on the left hand side to aid navigation. The data editor will open in an RStudio "dialog" box by default, but can be optionally displayed in the RStudio viewer pane or a web browser by setting viewer to "viewer" or "browser" respectively. For example, if we wanted to take a look at the mtcars dataset: data_edit(mtcars) Simply supply your data in the form of a matrix, ame or data.table to data_edit() to view it in an interactive table. If you would like to use the development version of DataEditR it can be installed directly from GitHub: devtools::install_github("DillonHammill/DataEditR") In order to get started with DataEditR, we will need to install the package from CRAN and load it into our current R session: install.packages("DataEditR") In this vignette we will explore some of the key features that are available through the data_edit() function. First create a flextable and change header font in bold.DataEditR is an R package built on shiny and rhandsontable that makes it easy to interactively view, enter, filter and edit data. Unexisting columns are containing blanks by default but this content can be customized. See functions autofit() and dim_pretty().Ĭolumns to display are by default all columns of the ame but can be choosen from a subset of existing columns and also unexisting columns. Beeing able to define the exact size necessary to display data on a single line is a key concept. The dimensions of the flextable elements, widths of columns and heights of rows, are always defined. Paragraphs can contain several chunks of text with different formatting but also images. Any formatting property related to text, paragraphs, cells in the table can be modified.Ī cell is made of one single paragraph of text.
0 Comments
Leave a Reply. |