knitr::opts_chunk$set(echo = TRUE,comment =NA,fig.align='center',out.width="70%")
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:
data.frame
or a tibble
in your R session, e.g. mtcars
(1).knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/editData/master/man/figures/1.png")
knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/editData/master/man/figures/2.png")
knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/editData/master/man/figures/3.png")
You can enter data name(4) to edit, upload a CSV or excel or RDS file(5) and download the edited data as a csv(6) or xlsx(7) or RDS (8)file.
knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/editData/master/man/figures/4.png")
knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/editData/master/man/figures/7.png")
6 By default, the sampleData
included in the editData
package is selected. The sex
and bloodType
column are factor
variables. A selectInput
is assigned for a column of class factor.
knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/editData/master/man/figures/5.png")
dateInput
is assigned for a column of class date
.knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/editData/master/man/figures/6.png")
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 these 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'))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.