Skip to contents

Create a {soils} project

create_soils()
Create a project directory for generating soil health reports

Data wrangling

get_n_texture_by_var()
Calculate n samples and most frequent texture by a grouping variable
summarize_by_project()
Summarize samples across the project
summarize_by_var()
Summarize producer's samples with averages by grouping variable
get_table_headers()
Get table headers for flextable
prep_for_map()
Prep data to gis df

Map

make_leaflet()
Make leaflet map

Plots

make_texture_triangle()
Make a textural class triangle
add_texture_points()
Add points to texture triangle
add_legend()
Add a legend to the texture triangle
make_strip_plot()
Make a facetted strip plot
theme_facet_strip()
Theme for facetted strip plots
set_scales()
Define styles for producer's samples versus all samples
convert_ggiraph()
Convert a ggplot2 plot to an interactive ggiraph

Tables

make_ft()
Make a flextable with column names from another dataframe
unit_hline()
Add bottom border to specific columns in flextable
format_ft_colors()
Conditional formatting of flextable background cell colors
style_ft()
Style a flextable

Helpers

calculate_mode()
Calculate the mode of categorical variable
pull_unique()
Pull unique values from one column of dataframe

Example data

soils_example()
Get path to example data
washi_data
Example WaSHI data
data_dictionary
Data dictionary