Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve vignettes and README #116

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
72ea17e
replace example datasets + edit doc
ahasverus Apr 12, 2024
8566e98
update example raw dataset
ahasverus Apr 12, 2024
da1f20c
use new dataset in vignettes/
ahasverus Apr 15, 2024
664613f
use new dataset in examples
ahasverus Apr 15, 2024
baab125
fix typos in vignettes
ahasverus Apr 15, 2024
bbc5d4a
add fundiversity in suggest deps
ahasverus Apr 15, 2024
4ee3dd1
remove non-ascii character in crs
ahasverus Apr 15, 2024
5cd2af3
use new dataset in tests/
ahasverus Apr 15, 2024
3ce4594
Apply renaming suggestions
Jul 25, 2024
b14ce67
Rename all datasets
Jul 30, 2024
a798038
Rename datasets in function examples
Jul 30, 2024
4aa5b4b
Remove calls to library() in examples
Jul 30, 2024
d17accf
Merge branch 'main' into update-datasets
Jul 30, 2024
c50a29e
Update project ID
Rekyt Jan 30, 2025
c2d0f66
Simplify README and add some precisions
Rekyt Feb 12, 2025
cdced78
Correct vignette and add precision on mFD/funrar
Rekyt Feb 12, 2025
305c212
build: increase roxygen2 version
ahasverus Feb 13, 2025
0dadfa0
doc: rename dataset names (woodiv_*)
ahasverus Feb 13, 2025
797ad95
test: rename dataset names (woodiv_*)
ahasverus Feb 13, 2025
7910e9a
fix: warnings in tidyverse arguments
ahasverus Feb 13, 2025
e51608d
doc: fix pkgdown reference
ahasverus Feb 13, 2025
93127e6
Update Rproj file
Rekyt Feb 13, 2025
fd63fdc
Better introduce the concept of FD and ref. Mammola et al. 2021
Rekyt Feb 13, 2025
941f26a
Update diagnostic plot functions table with better symbols
Rekyt Feb 13, 2025
2e3cfb4
Simplify diagnostic plot functions table
Rekyt Feb 13, 2025
636bb96
feat: new woodiv dataset
ahasverus Feb 14, 2025
f56336c
doc: rename raw dataset in example
ahasverus Feb 14, 2025
569f4ba
test: adapt tests w/ new woodiv dataset
ahasverus Feb 14, 2025
5f82239
doc: adapt vignettes w/ new woodiv dataset
ahasverus Feb 14, 2025
3832202
Merge branch 'update-datasets' of https://github.com/FRBCesab/funbiog…
Rekyt Feb 14, 2025
d664315
Update datasets.R
Rekyt Feb 14, 2025
bd120ef
Transfor title of help pages of datasets
Rekyt Feb 14, 2025
f945eb0
Merge branch 'update-datasets' of https://github.com/FRBCesab/funbiog…
Rekyt Feb 14, 2025
0e639ca
Update title of datasets in docs
Rekyt Feb 14, 2025
9780dc8
Correct interpretation on diagnostic plots vignette
Rekyt Feb 14, 2025
7be1161
Update map raster
Rekyt Feb 14, 2025
e24290f
Merge branch 'main' into better_documentation
Rekyt Feb 14, 2025
2971662
Remove last strikethrough text
Rekyt Feb 14, 2025
f5de633
Merge branch 'update-datasets' into better_documentation
Rekyt Feb 14, 2025
bf02eab
Fix missing curly bracket
Rekyt Feb 14, 2025
27777b7
Check numbers
Rekyt Feb 14, 2025
842a6ed
Correct typos and make formatting consistent
Rekyt Feb 14, 2025
9caea75
Began correcting more vignettes
Rekyt Feb 14, 2025
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
52 changes: 25 additions & 27 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,24 @@ pkgload::load_all()
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
<!-- badges: end -->



<p align="left">
• <a href="#overview">Overview</a><br>
• <a href="#features">Features</a><br>
• <a href="#installation">Installation</a><br>
• <a href="#first-steps">First steps</a><br>
• <a href="#long-form-documentations">Long-form documentations</a><br>
• <a href="#citation">Citation</a><br>
• <a href="#contributing">Contributing</a><br>
• <a href="#acknowledgments">Acknowledgments</a><br>
• <a href="#references">References</a>
</p>

- [Overview](#overview)
- [Features](#features)
- [Installation](#installation)
- [First steps](#first-steps)
- [Long-form documentation (=vignettes)](#long-documentation)
- [Citation](#citation)
- [Contributing](#contributing)
- [Acknowledgments](#acknowledgments)
- [References](#references)


## Overview

The package `funbiogeo` aims to help users with analyses in functional biogeography (Violle _et al._ 2014) by loading and combining data, computing trait coverage, as well as computing functional diversity indices, drawing maps, correlating them with the environment, and upscaling assemblages.

The package `funbiogeo` aims to help users with analyses in functional biogeography ([Violle _et al._ 2014](#references)), the biogeography of species' traits, by loading and combining data, computing trait coverage, drawing maps, correlating them with the environment, and upscaling assemblages.
It is aimed at first-timers of functional biogeography as well as more experienced users who want to obtain quick and easy exploratory plots.

Below is a quick introduction to the main features of `funbiogeo`, if you want some more details about them, check [our vignettes](#long-form-documentation).



## Features
Expand All @@ -59,7 +55,7 @@ It is aimed at first-timers of functional biogeography as well as more experienc
* Extensive documentation (multiple vignettes, well-documented functions,
real-life example dataset) to guide you through functional biogeography
analyses,
* Nice default plotting functions using outputs from functional diversity
* Nice default plotting functions fully compatible with the outputs of functional diversity
packages (`betapart`, `fundiversity`, `hillR`, `mFD`, etc.),
* Automated standardized report that provide analyses and plots of your data,
* Functions to easily "upscale" your data to coarser spatial resolutions.
Expand All @@ -82,7 +78,7 @@ remotes::install_github("FRBCesab/funbiogeo")

This section will show you some useful functions from `funbiogeo`. For a longer introduction please refer to the ["Get started" vignette](https://frbcesab.github.io/funbiogeo/).

The package contains default example data named `species_traits`, `site_species`, and `site_locations`. You can for example visualize to completeness of your trait dataset using the `fb_plot_species_traits_completeness()` function:
The package contains default example data named `species_traits`, `site_species`, and `site_locations`. You can for example visualize to completeness of your trait dataset (which traits are known for which proportion of species) using the `fb_plot_species_traits_completeness()` function:

```{r plot-sp-tr-complete}
fb_plot_species_traits_completeness(species_traits)
Expand All @@ -98,26 +94,27 @@ See more features of `funbiogeo` in the [vignettes of the package](https://frbce



## Long-form documentations
## Long-form documentation

`funbiogeo` provides four vignettes to explain its functioning:

* A ["Get started" vignette](https://frbcesab.github.io/funbiogeo/articles/funbiogeo.html)
that describes its core features and guide you through a typical analysis.
* A [vignette on all diagnostic plots](https://frbcesab.github.io/funbiogeo/articles/diagnostic-plots.html)
* A vignette on [all diagnostic plots](https://frbcesab.github.io/funbiogeo/articles/diagnostic-plots.html)
provided in the package, which details how to use each plotting function and
how to interpret their output.
* A [vignette on formatting your data](https://frbcesab.github.io/funbiogeo/articles/long-format.html)
to the needs of `funbiogeo`, which shows you the use of specific functions.
* And a [specific vignette on upscaling](https://frbcesab.github.io/funbiogeo/articles/upscaling.html)
which explains how to aggregate automatically your data to coarser grain and
use it in further analyses.
* A vignette on [the data format](https://frbcesab.github.io/funbiogeo/articles/long-format.html)
that `funbiogeo` needs, which shows you the use of specific functions to format your data to work well within `funbiogeo`.
* A vignette on [data upscaling](https://frbcesab.github.io/funbiogeo/articles/upscaling.html)
which explains how to leverage `funbiogeo` to aggregate automatically your data to coarser grain and
use them in further analyses.



## Citation

For the moment `funbiogeo` doesn't offer a companion paper. But if you happen to use it in your paper you can cite the package through:
For the moment `funbiogeo` doesn't offer a companion paper nor is it on CRAN.
But if you happen to use it in your paper you can cite the package through:

> Casajus N & Grenié M (2024). _funbiogeo: Functional Biogeography Analyses_. R package version 0.0.0.9000, <https://github.com/frbcesab/funbiogeo>.

Expand All @@ -131,7 +128,8 @@ citation("funbiogeo")

## Contributing

All types of contributions are encouraged and valued. For more information, check out our [Contributor Guidelines](https://github.com/FRBCesab/funbiogeo/blob/main/CONTRIBUTING.md).
All types of contributions are encouraged and valued.
For more information, check out our [Contributor Guidelines](https://github.com/FRBCesab/funbiogeo/blob/main/CONTRIBUTING.md).

Please note that the `funbiogeo` project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

Expand Down
70 changes: 37 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# funbiogeo <img src="man/figures/logo.png" align="right" style="float:right; height:120px;"/>
# funbiogeo - Streamlining functional biogeography analyses <img src="man/figures/logo.png" align="right" style="float:right; height:120px;"/>

<!-- badges: start -->

Expand All @@ -13,28 +13,29 @@ status](https://www.r-pkg.org/badges/version/funbiogeo)](https://CRAN.R-project.
v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
<!-- badges: end -->

<p align="left">
• <a href="#overview">Overview</a><br> •
<a href="#features">Features</a><br> •
<a href="#installation">Installation</a><br> •
<a href="#first-steps">First steps</a><br> •
<a href="#long-form-documentations">Long-form documentations</a><br> •
<a href="#citation">Citation</a><br> •
<a href="#contributing">Contributing</a><br> •
<a href="#acknowledgments">Acknowledgments</a><br> •
<a href="#references">References</a>
</p>
- [Overview](#overview)
- [Features](#features)
- [Installation](#installation)
- [First steps](#first-steps)
- [Long-form documentation (=vignettes)](#long-documentation)
- [Citation](#citation)
- [Contributing](#contributing)
- [Acknowledgments](#acknowledgments)
- [References](#references)

## Overview

The package `funbiogeo` aims to help users with analyses in functional
biogeography (Violle *et al.* 2014) by loading and combining data,
computing trait coverage, as well as computing functional diversity
indices, drawing maps, correlating them with the environment, and
upscaling assemblages.
biogeography ([Violle *et al.* 2014](#references)), the biogeography of
species’ traits, by loading and combining data, computing trait
coverage, drawing maps, correlating them with the environment, and
upscaling assemblages. It is aimed at first-timers of functional
biogeography as well as more experienced users who want to obtain quick
and easy exploratory plots.

It is aimed at first-timers of functional biogeography as well as more
experienced users who want to obtain quick and easy exploratory plots.
Below is a quick introduction to the main features of `funbiogeo`, if
you want some more details about them, check [our
vignettes](#long-form-documentation).

## Features

Expand All @@ -47,8 +48,9 @@ experienced users who want to obtain quick and easy exploratory plots.
- Extensive documentation (multiple vignettes, well-documented
functions, real-life example dataset) to guide you through functional
biogeography analyses,
- Nice default plotting functions using outputs from functional
diversity packages (`betapart`, `fundiversity`, `hillR`, `mFD`, etc.),
- Nice default plotting functions fully compatible with the outputs of
functional diversity packages (`betapart`, `fundiversity`, `hillR`,
`mFD`, etc.),
- Automated standardized report that provide analyses and plots of your
data,
- Functions to easily “upscale” your data to coarser spatial
Expand All @@ -72,8 +74,9 @@ vignette](https://frbcesab.github.io/funbiogeo/).

The package contains default example data named `species_traits`,
`site_species`, and `site_locations`. You can for example visualize to
completeness of your trait dataset using the
`fb_plot_species_traits_completeness()` function:
completeness of your trait dataset (which traits are known for which
proportion of species) using the `fb_plot_species_traits_completeness()`
function:

``` r
fb_plot_species_traits_completeness(species_traits)
Expand All @@ -94,31 +97,32 @@ fb_map_site_traits_completeness(site_locations, site_species, species_traits)
See more features of `funbiogeo` in the [vignettes of the
package](https://frbcesab.github.io/funbiogeo/articles/)

## Long-form documentations
## Long-form documentation

`funbiogeo` provides four vignettes to explain its functioning:

- A [“Get started”
vignette](https://frbcesab.github.io/funbiogeo/articles/funbiogeo.html)
that describes its core features and guide you through a typical
analysis.
- A [vignette on all diagnostic
- A vignette on [all diagnostic
plots](https://frbcesab.github.io/funbiogeo/articles/diagnostic-plots.html)
provided in the package, which details how to use each plotting
function and how to interpret their output.
- A [vignette on formatting your
data](https://frbcesab.github.io/funbiogeo/articles/long-format.html)
to the needs of `funbiogeo`, which shows you the use of specific
functions.
- And a [specific vignette on
- A vignette on [the data
format](https://frbcesab.github.io/funbiogeo/articles/long-format.html)
that `funbiogeo` needs, which shows you the use of specific functions
to format your data to work well within `funbiogeo`.
- A vignette on [data
upscaling](https://frbcesab.github.io/funbiogeo/articles/upscaling.html)
which explains how to aggregate automatically your data to coarser
grain and use it in further analyses.
which explains how to leverage `funbiogeo` to aggregate automatically
your data to coarser grain and use them in further analyses.

## Citation

For the moment `funbiogeo` doesn’t offer a companion paper. But if you
happen to use it in your paper you can cite the package through:
For the moment `funbiogeo` doesn’t offer a companion paper nor is it on
CRAN. But if you happen to use it in your paper you can cite the package
through:

> Casajus N & Grenié M (2024). *funbiogeo: Functional Biogeography
> Analyses*. R package version 0.0.0.9000,
Expand Down
Binary file modified man/figures/README-plot-sp-tr-complete-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 15 additions & 15 deletions man/rmdchunks/_table-plot-functions.Rmd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
| Function name | Site x species | Species x traits | Site x locations | Species category | Additional input |
| :------------------------------------------- |:-------------: | :--------------: | :--------------: | :--------------: | :--------------: |
| `fb_plot_distribution_site_trait_coverage()` | | | | | |
| `fb_plot_number_sites_by_species()` | | | | | |
| `fb_plot_number_species_by_trait()` | | | | | |
| `fb_plot_number_traits_by_species()` | | | | | |
| `fb_plot_site_environment()` | | | | | |
| `fb_plot_site_traits_completeness()` | | | | | |
| `fb_plot_species_traits_completeness()` | | | | | |
| `fb_plot_species_traits_missingness()` | | | | | |
| `fb_plot_trait_combination_frequencies()` | | | | | |
| `fb_plot_trait_correlation()` | | | | | |
| `fb_map_raster()` | | | | | |
| `fb_map_site_data()` | | | | | |
| `fb_map_site_traits_completeness()` | | | | | |
| Function name | Site<br>x<br>species | Species<br>x<br>traits | Site<br>x<br>locations | Species category | Additional input |
| :------------------------------------------- | :--------------: | :----------------: | :----------------: | :--------------: | :--------------: |
| `fb_plot_distribution_site_trait_coverage()` | ✳️ | ✳️ | | 🟠 | |
| `fb_plot_number_sites_by_species()` | ✳️ | | | | |
| `fb_plot_number_species_by_trait()` | | ✳️ | | 🟠 | |
| `fb_plot_number_traits_by_species()` | | ✳️ | | 🟠 | |
| `fb_plot_site_environment()` | | | ✳️ | | ✳️ |
| `fb_plot_site_traits_completeness()` | ✳️ | ✳️ | | 🟠️ | |
| `fb_plot_species_traits_completeness()` | | ✳️ | | 🟠 | |
| `fb_plot_species_traits_missingness()` | | ✳️ | | 🟠 | |
| `fb_plot_trait_combination_frequencies()` | | ✳️ | | 🟠 | |
| `fb_plot_trait_correlation()` | | ✳️ | | 🟠 | |
| `fb_map_raster()` | | | | | ✳️ |
| `fb_map_site_data()` | | | ✳️ | | ✳️ |
| `fb_map_site_traits_completeness()` | ✳️ | ✳️ | ✳️ | | |
12 changes: 4 additions & 8 deletions vignettes/diagnostic-plots.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Diagnostic Plots in funbiogeo"
title: "Diagnostic plots in funbiogeo"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Diagnostic Plots in funbiogeo}
%\VignetteIndexEntry{Diagnostic plots in funbiogeo}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand All @@ -28,9 +28,8 @@ displaying information by each category of species (family, order, endemism stat
```{r child="../man/rmdchunks/_table-plot-functions.Rmd"}
```

Table: A table of available plotting functions in `funbiogeo` ordered
alphabetically with their required arguments. The "Additional input" column
reflects the need for other argument that are not of the standard object type.
Table: required ✳️; optional 🟠; absent ➖<br>
"Additional input" means other types of arguments

Let's first load the package and example datasets included in the `funbiogeo`.

Expand Down Expand Up @@ -314,9 +313,6 @@ The plot displays the number of species with known and missing traits. It shows
each trait in separate line as a proportional bar chart with the total numbers
included within each bar.

~~Here we see that 53 species have all of their traits known while 96 don't.
Adult body mass is known for 123 species and missing for 26.~~


### Displaying traits combinations

Expand Down
Loading
Loading