title | author | date | output | vignette |
---|---|---|---|---|
package editData : An RStudio Addin for Editing A 'data.frame' |
Keon-Woong Moon |
2017-10-06 |
rmarkdown::html_vignette |
%\VignetteIndexEntry{editData} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8}
|
The 'editData' is an RStudio addin for editing a 'data.frame' or a 'tibble'. Many RStudio users want to edit a data.frame. With this 'editData' package, you can delete, add or update a 'data.frame' without coding. You don't have to use Microsoft excel or a csv editor any more to edit data. You can get resultant data as a 'tibble' or as a 'data.frame'. You can read a csv file in the disk and save it as a csv format.
You can install editData
package from CRAN.
install.packages("editData")
You can install the developmental version of editData
package from github.
#install.packages("devtools")
devtools::install_github("cardiomoon/editData")
After install this editData
package you can see the editData
addin in RStudio's addins. (See the second plot).
This addin can be used to interactively manipulate a data.frame
or a tibble
. The intended way to use this is as follows:
- Highlight a symbol naming a
data.frame
or atibble
in your R session, e.g.mtcars
(1).
- Execute this addin(arrow), to interactively manipulate it.
- You can select and unselect a row by clicking a row in dataTable. You can delete the selected row(1), add a new row(2) or edit a row(3). You can select single or multiple rows(4) to delete.
You can enter data name(5) to edit, upload a CSV file(6) and download the edited data as a csv file(7).
- If you press the edit button you can see this window. You can move to the desired row, edit rowname and individual data. You can delete the row or update the data.
- By default, the
sampleData
included in theeditData
package is selected. Thesex
andbloodType
column arefactor
variables. AselectInput
is assigned for a column of class factor.
- A
dateInput
is assigend for a column of classdate
.
You can use the editData()
function as a regular function, e.g. in a command line.
require(editData)
result <- editData(mtcars)
The resultant 'tibble' or 'data.frame' is assigned to the object result
.
The editData
package is made of modularized shiny functions. You can use the modularized editableDTUI()
and editableDT()
functions in your shiny app. In this package, I have included three examples in the inst
folder. You can run ths examples with one of the following codes.
shiny::runApp(system.file('example',package='editData'))
shiny::runApp(system.file('multipleData',package='editData'))
shiny::runApp(system.file('multipleFiles',package='editData'))