Slaker

README (to be updated !)

slaker

slaker
Conduct, analyze and visualize QuantiSlake tests

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 :

http://www.cra.wallonie.be/fr/pirat

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) :

  1. Launch the program (see 'Computer' section)
  2. Turn on the scale and check that it is level (bubble level)
  3. Put distilled water in the berlin (1400 ml for transparent berlin, up to the mark for opaque berlin)
  4. Position the empty basket suspended from the scale in the water
  5. Tare the scale
  6. Remove the berlin
  7. Place the sample in the basket
  8. Once the sample number is correctly established in the application click on 'Start the Slaketest'.
  9. 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
  10. 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))
  11. 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

  1. First tab
    • When the first tab is active, you have to see sample and campaings in a table
  2. 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.

    plotslakes.png

4.2.6 Notes

## subzone ## in LTE - subzone = parcelle !

WORK IN PROGRESS

Footnotes:

1

if needed install.packages(devtools)

Available campaigns

Available series files

Available samples files




              

Iteration:


              

Mass 1:


              

Mass 2:


              

Elapsed Time (seconds):


              

A simple slake visualisation

N.B. - dots are mean, bars are standard deviation


                  

Plot

Table

Model

Table

Acronyms of indicators

Wmax = Weight max after immersion (after bubbles)

All weights are relative to Wmax

Wd = Weight dry soil

Wmax/Wd = Warchi = Archimède ? Density ?

Wt0 = Weight dry soil

T0 = Time at immersion

tmax = Time at Wmax

Wt0 = Weight at T0

Wmax - Wt0 = 1 - Wt0

Pente T0-Max = Sl.0.max = pente entre T0 et Max

Pente Max-30 = Sl.max.30 = pente entre Max et Max+30(sec.)

Pente Max-60 = Sl.max.60 = pente entre Max et Max+60(sec.)