Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: fluxible
Title: Ecosystem Gas Fluxes Calculations for Closed Loop Chamber Setup
Version: 1.3.6
Date: 2026-02-05
Version: 1.3.7
Date: 2026-03-17
Authors@R:
c(person(given = "Joseph", family = "Gaudard", , "joseph.gaudard@pm.me", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-6989-7624")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# fluxible 1.3.7

* `flux_plot`: argument `arrange_col` allows to customize the order of the facets

# fluxible 1.3.6

* fixed the use of `case_when()` to avoid warnings with `dplyr 1.2.0`.
Expand Down
13 changes: 10 additions & 3 deletions R/flux_fortify.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ flux_fortify <- function(slopes_df,
f_ylim_upper,
f_ylim_lower,
f_facetid,
y_text_position) {
y_text_position,
arrange_col) {

args_ok <- flux_fun_check(list(
f_ylim_upper = f_ylim_upper,
Expand All @@ -44,6 +45,7 @@ flux_fortify <- function(slopes_df,
select(
{{f_conc}},
{{f_datetime}},
{{arrange_col}},
all_of(f_facetid),
any_of(c(
"f_quality_flag",
Expand Down Expand Up @@ -108,14 +110,19 @@ flux_fortify <- function(slopes_df,
nb_fluxid <- n_distinct(slopes_df$f_fluxid)

# customize facet ID

slopes_df <- slopes_df |>
unite(
col = "f_facetid",
all_of(f_facetid),
sep = " "
sep = " ",
remove = FALSE
) |>
arrange({{arrange_col}}, {{f_datetime}}) |>
mutate(
f_facetid = fct_reorder(f_facetid, {{f_datetime}})
.by = "f_facetid",
rowid = cur_group_id(),
f_facetid = fct_reorder(f_facetid, .data$rowid)
)

# testing if f_facetid is unique, otherwise facet will make a mess
Expand Down
10 changes: 8 additions & 2 deletions R/flux_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#' measurement. Default is `f_fluxid`
#' @param longpdf_args arguments for longpdf in the form
#' `list(ncol, width (in cm), ratio)`
#' @param arrange_col character vector of columns to use to reorder the facets.
#' If NULL (default), facets are ordered by the datetime of the measurement.
#' @return plots of fluxes, with raw concentration data points, fit, slope,
#' and color code indicating quality flags and cuts. The plots are organized
#' in facets according to flux ID, and a text box display the quality flag and
Expand Down Expand Up @@ -99,17 +101,21 @@ flux_plot <- function(slopes_df,
y_text_position = 500,
print_plot = "FALSE",
output = "print_only",
ggsave_args = list()) {
ggsave_args = list(),
arrange_col = c()) {

# fortify data


slopes_params <- flux_fortify(
slopes_df = slopes_df,
f_conc = {{f_conc}},
f_datetime = {{f_datetime}},
f_ylim_upper = f_ylim_upper,
f_ylim_lower = f_ylim_lower,
f_facetid = f_facetid,
y_text_position = y_text_position
y_text_position = y_text_position,
arrange_col = {{arrange_col}}
)
slopes_df <- slopes_params$slopes_df

Expand Down
4 changes: 4 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ fluxes_gpp

The [`licoread` R package](https://jogaudard.github.io/licoread/index.html), developed in collaboration with [LI-COR](https://www.licor.com/), provides an easy way to import raw files from LI-COR gas analyzers as R objects that can be used directly with the `fluxible` R package.

### `readosense` R package

The [`readosense` R package](https://jogaudard.github.io/readosense/index.html) provides an easy way to import raw files from [Eosense](https://eosense.com/) multi chamber ecosystem gas flux setups as R objects that can be used directly with the `fluxible` R package.

## Further developments

### Segmentation tool
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ collaboration with [LI-COR](https://www.licor.com/), provides an easy
way to import raw files from LI-COR gas analyzers as R objects that can
be used directly with the `fluxible` R package.

### `readosense` R package

The [`readosense` R
package](https://jogaudard.github.io/readosense/index.html) provides an
easy way to import raw files from [Eosense](https://eosense.com/) multi
chamber ecosystem gas flux setups as R objects that can be used directly
with the `fluxible` R package.

## Further developments

### Segmentation tool
Expand Down
2 changes: 1 addition & 1 deletion dev/dev.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ devtools::load_all()
# autoimport::autoimport()

devtools::document()
devtools::test(filter = "flux_calc")
devtools::test(filter = "flux_plot")
devtools::test()
devtools::run_examples()
devtools::check()
Expand Down
3 changes: 2 additions & 1 deletion man/flux_fortify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/flux_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading