slaker
Conduct, analyze and visualize QuantiSlake tests
Table of Contents
1 Introduction
This R package provides functions for conducting a QuantiSlakeTest campaign, analysing and visualizing the results of a QuantiSlakeTest campaig. The easiest way to use it is through the ShinyApp included in the package.
1.1 The QuantiSlakeTest approach (to be ammended)
2 Installation
slaker is on development and hosted on Gitlab.
Using the package devtools
1 to install slaker
, you can install it with the command :
install.packages("devtools") ## Maybe need also : ## install.packages("stringi") ## install.packages("roxygen2")
2.1 Installation of the package from gitlab in R
devtools::install_git("https://gitlab.com/FrdVnW/slaker", upgrade_dependencies = FALSE) ## install_gitlab("FrdVnW/slaker", upgrade = "never") ## new version of devtools
This package is in a development state and is linked to work with the data collected in the framework of the PIRAT project of the CRA-W :
2.2 Loading of the package from your computer
If slaker
is already on your computer, you can use this command to load it :
devtools::load_all("~/Code/R/slaker/slaker/")
3 Slaker Project
3.1 Create a blank project
3.1.1 Create folders
project_path <- "~/slaker-sample-project/" dir.create(project_path) for (dir in c("data-output","data-raw","fig","output")) { dir.create(paste0(project_path,dir)) } list.files(project_path)
4 Usage
4.1 Modus operandi of the slake test (in your labs) :
- Launch the program (see 'Computer' section)
- Turn on the scale and check that it is level (bubble level)
- Put distilled water in the berlin (1400 ml for transparent berlin, up to the mark for opaque berlin)
- Position the empty basket suspended from the scale in the water
- Tare the scale
- Remove the berlin
- Place the sample in the basket
- Once the sample number is correctly established in the application click on 'Start the Slaketest'.
- When the graph begins to be constructed, quickly replace the basket with the sample in the water, making sure that the basket does not touch the edges
- Once the slaketest is finished (when the slope is relatively nil, usually from 1000s), click on 'Stop the Slaketest'. Wait for the graph to disappear (this may take some iteration(s))
- To limit the risk of bugs, it is better to switch the scales off and on again between each test.
4.2 Usage of the slaker package
4.2.1 Create the structure (here with examples)
Open R or RStudio in a well defined working directory on your computer. And create the project structure with the function create_slaker_project
.
slaker::create_slaker_project("projet_nico", sample=TRUE)
Here, example files are given in the folders.
4.2.2 Look at the structure and mimic it for your project
4.2.3 Set working directory and some configuration variables
setwd("./projet_nico/") ## Lignes de config fields.series <- c("campaign","serie","crop","parcel","bloc","modalite") fields.samples <- c("sample","campaign.samples","serie.samples","mode","profondeur","drying_temp","drying_j","eau") project_path <- paste0(getwd(),"/")
4.2.4 Run the application
slaker::slaker()
4.2.5 Check up
- First tab
- When the first tab is active, you have to see sample and campaings in a table
- Go to the 4th tab, the Visualizr and choose these options (!!!)
You have an error message "object 'df.slake' not found" (OK)
Then :
- Select a file with your series (in ./data-raw) : 1-series-cyril.csv
- Select a file with your samples (in ./data-raw) : 2-samples-new-cyril.csv
- Select a file with your slakes (in ./data-raw) : 3-slakes-all.csv
- Choose one or more campaing(s) for comparison : CDM
- Choose one drying protocol : 50
- Choose some slakes for comparison : [all are selected]
Then Click to the above 'Update view' and … wait (!!!). The error message has to dippear and you will see a first graph.
4.2.6 Notes
## subzone ## in LTE - subzone = parcelle !
WORK IN PROGRESS
Footnotes:
if needed install.packages(devtools)