Skip to content

Commit

Permalink
fix: bug fix for v0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
adrientaudiere committed Apr 28, 2024
1 parent 4c0082e commit 9860e25
Show file tree
Hide file tree
Showing 26 changed files with 131 additions and 123 deletions.
14 changes: 8 additions & 6 deletions R/plot_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1471,17 +1471,19 @@ hill_pq <- function(physeq,
"You must set only one parameter of variable or fact. This 2
parameters are strictly equivalent."
)
} else {
variable_fac <- variable
}
} else {
if (!is.null(fact)) {
variable <- fact
variable_fac <- fact
} else {
stop("You must set the parameter fact.")
}
}
var <- sym(variable)
var <- sym(variable_fac)
if (is.na(color_fac)) {
color_fac <- sym(variable)
color_fac <- sym(variable_fac)
} else {
color_fac <- sym(color_fac)
}
Expand All @@ -1507,7 +1509,7 @@ hill_pq <- function(physeq,
p_var <-
hill_tuckey_pq(
physeq,
modality = variable,
modality = variable_fac,
hill_scales = hill_scales,
correction_for_sample_size = correction_for_sample_size
)
Expand All @@ -1525,9 +1527,9 @@ hill_pq <- function(physeq,
subtitle_plot <- paste0(
"Nb of samples: '",
paste0(
names(table(physeq@sam_data[[variable]])),
names(table(physeq@sam_data[[variable_fac]])),
sep = "' : ",
table(physeq@sam_data[[variable]]),
table(physeq@sam_data[[variable_fac]]),
collapse = " - '"
)
)
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ summary_plot_pq(data_fungi)
### Alpha-diversity analysis

```{r, fig.cap="Hill number 1"}
p <- MiscMetabar::hill_pq(data_fungi, variable = "Height")
p <- MiscMetabar::hill_pq(data_fungi, fact = "Height")
p$plot_Hill_0
```

Expand Down
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,32 +117,16 @@ summary_plot_pq(data_fungi)
### Alpha-diversity analysis

``` r
p <- MiscMetabar::hill_pq(data_fungi, variable = "Height")
p <- MiscMetabar::hill_pq(data_fungi, fact = "Height")
p$plot_Hill_0
#> NULL
```

<div class="figure">

<img src="man/figures/README-unnamed-chunk-5-1.png" alt="Hill number 1" width="100%" />
<p class="caption">
Hill number 1
</p>

</div>

``` r
p$plot_tuckey
#> NULL
```

<div class="figure">

<img src="man/figures/README-unnamed-chunk-6-1.png" alt="Result of the Tuckey post-hoc test" width="100%" />
<p class="caption">
Result of the Tuckey post-hoc test
</p>

</div>

### Beta-diversity analysis

``` r
Expand Down
8 changes: 4 additions & 4 deletions docs/articles/MiscMetabar.html

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions docs/articles/Reclustering.html

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

Binary file modified docs/articles/Reclustering_files/figure-html/unnamed-chunk-4-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/alpha-div_files/figure-html/unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 16 additions & 24 deletions docs/index.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ articles:
states_of_fields_in_R: states_of_fields_in_R.html
tengeler: tengeler.html
tree_visualization: tree_visualization.html
last_built: 2024-04-26T13:02Z
last_built: 2024-04-28T13:37Z
urls:
reference: https://adrientaudiere.github.io/MiscMetabar/reference
article: https://adrientaudiere.github.io/MiscMetabar/articles
Expand Down
Binary file modified docs/reference/Rplot001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/Rplot003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/SRS_curve_pq-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/accu_plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/accu_plot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/accu_plot.html

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

2 changes: 1 addition & 1 deletion docs/reference/asv2otu.html

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

Loading

0 comments on commit 9860e25

Please sign in to comment.