| Title: | 'Shiny' GUI for the 'biocharkit' Biochar Analysis Toolkit |
|---|---|
| Description: | A point-and-click 'Shiny' interface to the 'biocharkit' package. Lets a user upload Excel workbooks of biochar characterisation and batch adsorption data, map spreadsheet columns to the required variables via dropdown menus, and run sample-ID parsing, adsorption capacity and removal efficiency calculations, isotherm fitting (Langmuir, Freundlich, Temkin, Dubinin-Radushkevich, Sips), kinetics fitting (pseudo-first/ second-order, Elovich, intraparticle diffusion), van't Hoff thermodynamics, batch fitting across many samples at once, FTIR baseline correction, automatic peak picking and functional-group analysis, XRD peak deconvolution and crystallinity index, BET surface area, TGA analysis (DTG curve with auto-detected decomposition peaks, moisture/volatile-matter/ash/fixed-carbon straight off a curve for a single sample or in batch across many, and Kissinger non-isothermal kinetics from multi-heating-rate data), proximate/ultimate analysis, and correlation matrices, without writing any R code. Results and 600 dpi TIFF figures can be downloaded directly from the browser, along with a combined analysis report. |
| Authors: | Sukamal Sarkar [aut, cre] |
| Maintainer: | Sukamal Sarkar <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.1 |
| Built: | 2026-09-18 08:52:18 UTC |
| Source: | https://github.com/cran/biocharkitgui |
Compute adsorption capacity and removal efficiency from an uploaded data frame
gui_adsorption(df, c0_col, ce_col, v_col, m_col, id_col = NULL)gui_adsorption(df, c0_col, ce_col, v_col, m_col, id_col = NULL)
df |
Data frame. |
c0_col, ce_col, v_col, m_col
|
Column names for initial concentration (mg/L), equilibrium concentration (mg/L), volume (L), and adsorbent mass (g) respectively. |
id_col |
Optional column name to carry through as a sample identifier in the output (not used in the calculation). |
A data frame with the original identifying column (if given),
qe_mgg and removal_pct.
BET surface area from an uploaded data frame
gui_bet(df, pp0_col, q_col)gui_bet(df, pp0_col, q_col)
df |
Data frame. |
pp0_col |
Column name for relative pressure (P/P0). |
q_col |
Column name for quantity adsorbed (cm^3/g STP). |
The list returned by biocharkit::bet_surface_area().
Correlation matrix for display, in long format
gui_correlation(df, cols, method = c("spearman", "pearson", "kendall"))gui_correlation(df, cols, method = c("spearman", "pearson", "kendall"))
df |
Data frame. |
cols |
Character vector of numeric column names to correlate. |
method |
|
A list with wide_estimate (matrix), long (data frame with
var1, var2, rho, p_value, one row per unique pair, for easy
table display/download).
Thin wrapper around DT::datatable() with sensible defaults for this
app (paginated, 10 rows per page).
gui_datatable(df, page_length = 10)gui_datatable(df, page_length = 10)
df |
Data frame to display. |
page_length |
Rows per page. Default |
A DT::datatable htmlwidget.
Automatic FTIR peak picking from an uploaded full spectrum
gui_ftir_autopeaks(df, wavenumber_col, intensity_col, min_prominence = 0)gui_ftir_autopeaks(df, wavenumber_col, intensity_col, min_prominence = 0)
df |
Data frame. |
wavenumber_col, intensity_col
|
Column names. |
min_prominence |
Minimum prominence for a peak to be kept. |
A data frame from biocharkit::find_ftir_peaks().
Baseline-correct an FTIR spectrum from an uploaded data frame
gui_ftir_baseline( df, wavenumber_col, intensity_col, method = c("linear", "rolling_min") )gui_ftir_baseline( df, wavenumber_col, intensity_col, method = c("linear", "rolling_min") )
df |
Data frame. |
wavenumber_col, intensity_col
|
Column names. |
method |
|
A two-column data frame (wavenumber_cm1, intensity), the
baseline-corrected spectrum.
Functional-group density from an uploaded full FTIR spectrum
gui_ftir_density(df, wavenumber_col, intensity_col)gui_ftir_density(df, wavenumber_col, intensity_col)
df |
Data frame with a wavenumber column and an intensity column. |
wavenumber_col, intensity_col
|
Column names. |
A list with table (from
biocharkit::functional_group_density()) and spectrum (a
two-column data frame usable with
biocharkit::plot_ftir_spectrum()).
Assign FTIR peak positions to functional groups
gui_ftir_peaks(df, peak_col)gui_ftir_peaks(df, peak_col)
df |
Data frame with a column of peak wavenumbers. |
peak_col |
Column name. |
A data frame from biocharkit::assign_ftir_peaks().
Fit an adsorption isotherm from an uploaded data frame
gui_isotherm( df, ce_col, qe_col, model = c("langmuir", "freundlich", "temkin", "dr", "sips") )gui_isotherm( df, ce_col, qe_col, model = c("langmuir", "freundlich", "temkin", "dr", "sips") )
df |
Data frame. |
ce_col, qe_col
|
Column names for equilibrium concentration (mg/L) and adsorption capacity (mg/g). |
model |
|
A list with elements fit, params (a one-row data frame of
fitted parameters for display), Ce, qe, and model.
Fit an adsorption isotherm separately per group in an uploaded data frame
gui_isotherm_batch( df, group_col, ce_col, qe_col, model = c("langmuir", "freundlich", "temkin", "dr", "sips") )gui_isotherm_batch( df, group_col, ce_col, qe_col, model = c("langmuir", "freundlich", "temkin", "dr", "sips") )
df |
Data frame. |
group_col |
Grouping column (e.g. sample ID). |
ce_col, qe_col
|
Column names as in |
model |
One of |
A data frame with one row per group (see
biocharkit::fit_isotherm_batch()).
Fit adsorption kinetics from an uploaded data frame
gui_kinetics( df, t_col, qt_col, model = c("pfo", "pso", "elovich", "intraparticle") )gui_kinetics( df, t_col, qt_col, model = c("pfo", "pso", "elovich", "intraparticle") )
df |
Data frame. |
t_col, qt_col
|
Column names for contact time and adsorption capacity at time t (mg/g). |
model |
|
A list with elements fit, params, t, qt, model.
Fit adsorption kinetics separately per group in an uploaded data frame
gui_kinetics_batch( df, group_col, t_col, qt_col, model = c("pfo", "pso", "elovich", "intraparticle") )gui_kinetics_batch( df, group_col, t_col, qt_col, model = c("pfo", "pso", "elovich", "intraparticle") )
df |
Data frame. |
group_col |
Grouping column (e.g. sample ID). |
t_col, qt_col
|
Column names as in |
model |
One of |
A data frame with one row per group (see
biocharkit::fit_kinetics_batch()).
List sheet names in an uploaded Excel workbook
gui_list_sheets(path)gui_list_sheets(path)
path |
Path to an |
Character vector of sheet names.
Parse sample IDs from an uploaded data frame
gui_parse_ids(df, id_col)gui_parse_ids(df, id_col)
df |
Data frame (from |
id_col |
Name of the column containing sample IDs. |
A data frame from biocharkit::parse_sbc_id().
Thin wrapper around utils::head() used by the Shiny app's data preview.
gui_preview(df, n = 5)gui_preview(df, n = 5)
df |
Data frame. |
n |
Number of rows to show. Default |
A data frame: the first n rows of df.
Proximate analysis from an uploaded data frame
gui_proximate(df, moisture_col, vm_col, ash_col, id_col = NULL)gui_proximate(df, moisture_col, vm_col, ash_col, id_col = NULL)
df |
Data frame. |
moisture_col, vm_col, ash_col
|
Column names for moisture %, volatile matter %, and ash % (as-received basis). |
id_col |
Optional identifier column to carry through. |
A data frame from biocharkit::proximate_analysis().
Thin, defensive wrapper around readxl::read_excel() that returns plain
data.frames (not tibbles) and gives an informative error rather than a
cryptic one if the file or sheet can't be read.
gui_read_excel(path, sheet = 1)gui_read_excel(path, sheet = 1)
path |
Path to an |
sheet |
Sheet name or 1-based index. Defaults to the first sheet. |
A data.frame.
Renders report_template.Rmd (shipped in inst/shiny-app/report/)
against a snapshot of accumulated analysis results, producing a
self-contained HTML report.
gui_render_report(store, output_file)gui_render_report(store, output_file)
store |
A named list of accumulated results (see the Shiny app's
server code for the expected structure); sections for |
output_file |
Destination |
Invisibly, output_file.
Opens a PNG device, evaluates expr (a plotting call such as
biocharkit::plot_isotherm()), closes the device, and returns the file
path. Used to capture plots for inclusion in the combined session
report.
gui_snapshot_png(expr, width = 900, height = 650, res = 130)gui_snapshot_png(expr, width = 900, height = 650, res = 130)
expr |
A plotting expression/call to evaluate with the device open. |
width, height
|
Pixel dimensions. Defaults |
res |
Resolution (dpi). Default |
The path to the written PNG file (a temp file).
Build a canonical TGA curve data frame from uploaded columns
gui_tga_curve(df, temperature_col, weight_col)gui_tga_curve(df, temperature_col, weight_col)
df |
Data frame. |
temperature_col, weight_col
|
Column names for temperature (degrees C) and weight percent. |
A data frame with columns temperature_C, weight_pct.
Kissinger non-isothermal kinetics from an uploaded multi-heating-rate table
gui_tga_kissinger(df, beta_col, tpeak_col)gui_tga_kissinger(df, beta_col, tpeak_col)
df |
Data frame with one row per heating-rate run (not a raw TGA curve): typically produced by running the TGA curve tab once per heating rate and noting the DTG peak temperature each time. |
beta_col |
Column name for heating rate (degrees C/min). |
tpeak_col |
Column name for the DTG peak temperature (degrees C) at that heating rate, for the same decomposition stage across rows. |
A list with elements fit (from
biocharkit::tga_kinetics_kissinger()) and params (a one-row data
frame for display).
Proximate analysis directly from an uploaded TGA curve
gui_tga_stages( df, temperature_col, weight_col, moisture_end = 110, vm_end = 650 )gui_tga_stages( df, temperature_col, weight_col, moisture_end = 110, vm_end = 650 )
df |
Data frame. |
temperature_col, weight_col
|
Column names as in |
moisture_end, vm_end
|
Temperature breakpoints (degrees C); see
|
A data frame from biocharkit::tga_stages().
Proximate analysis from TGA curves, separately per sample in an uploaded long-format data frame
gui_tga_stages_batch( df, group_col, temperature_col, weight_col, moisture_end = 110, vm_end = 650 )gui_tga_stages_batch( df, group_col, temperature_col, weight_col, moisture_end = 110, vm_end = 650 )
df |
Data frame containing multiple samples' curves stacked long-format. |
group_col |
Grouping column (e.g. sample ID). |
temperature_col, weight_col
|
Column names as in |
moisture_end, vm_end
|
As in |
A data frame from biocharkit::tga_stages_batch().
Ultimate (CHNS) analysis atomic ratios from an uploaded data frame
gui_ultimate(df, c_col, h_col, o_col, n_col = NULL, id_col = NULL)gui_ultimate(df, c_col, h_col, o_col, n_col = NULL, id_col = NULL)
df |
Data frame. |
c_col, h_col, o_col
|
Column names for C%, H%, O% (mass basis). |
n_col |
Optional column name for N%. |
id_col |
Optional identifier column to carry through. |
A data frame from biocharkit::ultimate_ratios().
Van't Hoff thermodynamic analysis from an uploaded data frame
gui_vant_hoff(df, temp_col, kc_col)gui_vant_hoff(df, temp_col, kc_col)
df |
Data frame. |
temp_col |
Column name for absolute temperature (Kelvin). |
kc_col |
Column name for the equilibrium distribution coefficient (dimensionless, e.g. qe/Ce) at each temperature. |
The list returned by biocharkit::fit_vant_hoff().
Thin wrapper around utils::write.csv() used by the Shiny app's download
handlers.
gui_write_csv(x, file)gui_write_csv(x, file)
x |
Data frame to write. |
file |
Destination file path. |
Invisibly, NULL. Called for its side effect of writing file.
XRD crystallinity index for one or more samples
gui_xrd_ci(df, crystalline_col, amorphous_col, id_col = NULL)gui_xrd_ci(df, crystalline_col, amorphous_col, id_col = NULL)
df |
Data frame. |
crystalline_col, amorphous_col
|
Column names for crystalline and amorphous integrated peak areas. |
id_col |
Optional identifier column to carry through. |
A data frame with crystallinity index per row.
XRD peak deconvolution from an uploaded data frame
gui_xrd_deconvolve(df, two_theta_col, intensity_col, peak_centers)gui_xrd_deconvolve(df, two_theta_col, intensity_col, peak_centers)
df |
Data frame. |
two_theta_col, intensity_col
|
Column names for 2theta and intensity. |
peak_centers |
Numeric vector of approximate crystalline peak positions (2theta). |
The list returned by biocharkit::xrd_deconvolve().
Starts a local Shiny app in your default web browser. Upload Excel
(.xlsx/.xls) workbooks, map spreadsheet columns to the required
variables from dropdown menus, and run biochar characterisation and
adsorption analyses (sample ID parsing, adsorption capacity, isotherms,
kinetics, FTIR, XRD crystallinity index, correlation matrices) without
writing any R code.
run_biocharkit_gui(...)run_biocharkit_gui(...)
... |
Additional arguments passed to |
Called for its side effect of launching the Shiny app; does not return under normal use (control passes to the Shiny event loop until the app is closed).
if (interactive()) { run_biocharkit_gui() }if (interactive()) { run_biocharkit_gui() }