knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
# devtools::install_github( # repo = "https://github.com/MatthiasUckert/RsClassification", # build_vignettes = TRUE # )
library(RsClassification); library(fs); library(openxlsx); library(kableExtra)
Really short description on how to use the RsClassification library
The library includes a test project as reference. The project can be downloaded with the download_example_project() function (see below).
# RsClassification::download_example_project( # .dir = "FULL_PATH_TO_LOCAL_FOLDER", # .name = "TEST PROJECT" # )
A project must always contain one excel workbook (Excel Name: input.xlsx) and a folder with documents (Folder Name: docs). The name of the parent folder is used as the general project name.
The test project underlying data can also be accessed:
.dir <- system.file("extdata/test_project", package = "RsClassification") fs::dir_tree(.dir)
The input xlsx must contain two sheets:
Sheet 1: IDs
The IDssheet contains a table that lists all entries to classify (id 1:n) and the attributes you want to assign to each entry (column names).
Additionally in row (id = 0) you can specify the column types (numeric, date, checkbox, select, dropdown, autocomplete, password, and handsontable (not implemented yet), see rhandsontable::hot_col(type).
IDs must be unique
Sheet 2: Documents
The example file looks like this
.path <- file.path(.dir, "input.xlsx") tab_ids <- read.xlsx(.path, "IDs") tab_docs <- read.xlsx(.path, "Documents")
IDs Sheet
tab_ids %>% kbl() %>% kable_paper(full_width = FALSE)
Documents Sheet
tab_docs %>% kbl() %>% kable_paper(full_width = FALSE)
You can start classifying by using the run_app() function
# RsClassification::run_app()
The rest is hopefully self-explanatory :-D
Library will be heavily updated over the next weeks/months. Hopefully not so many breaking changes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.