Skip to contents

All functions

PlotFetcher
Fetch plot data
PlotFilterBuilder
Query builder for plot
add_entry_taxa()
Add new entry to taxonomic table
add_growth_form_taxa()
Add growth forms to a single taxa
add_individuals()
Add new individuals data
add_method()
Add a method in method list
add_plot_coordinates()
Add 1ha IRd plot coordinates
add_plots()
Add new plot metadata
add_sp_traits_measures()
Add an observation in trait measurement table at species level
add_specimens()
Add new specimens data
add_subplot_features()
List of subplot features
add_subplot_observations_feat()
#' Add a type in subplot table #' #' Add feature and associated descriptors in subplot list table #' #' @return nothing #' #' @author Gilles Dauby, gilles.dauby@ird.fr #' @param new_type string value with new type descritors - try to avoid space #' @param new_valuetype string one of following 'numeric', 'integer', 'categorical', 'ordinal', 'logical', 'character' #' @param new_maxallowedvalue numeric if valuetype is numeric, indicate the maximum allowed value #' @param new_minallowedvalue numeric if valuetype is numeric, indicate the minimum allowed value #' @param new_typedescription string full description of trait #' @param new_factorlevels string a vector of all possible value if valuetype is categorical or ordinal #' @param new_expectedunit string expected unit (unitless if none) #' @param new_comments string any comments #' #' @export add_subplottype <- function(new_type = NULL, new_valuetype = NULL, new_maxallowedvalue = NULL, new_minallowedvalue = NULL, new_typedescription = NULL, new_factorlevels = NULL, new_expectedunit = NULL, new_comments = NULL) if(is.null(new_type)) stop("define new type") if(try_open_postgres_table(table = "subplotype_list", con = mydb) dplyr::distinct(type) dplyr::filter(type == !!new_type) dplyr::collect() nrow()>0) stop("new type already in table") if (is.null(new_valuetype)) stop("define new_valuetype") if (!any(new_valuetype==c('numeric', 'integer', 'categorical', 'ordinal', 'logical', 'character', 'table_colnam'))) stop("valuetype should one of following 'numeric', 'integer', 'categorical', 'ordinal', 'logical', 'character' or 'table_colnam'") if (new_valuetype=="numeric" | new_valuetype=="integer") if (!is.numeric(new_maxallowedvalue) & !is.integer(new_maxallowedvalue)) stop("valuetype numeric of integer and max value not of this type") if (new_valuetype=="numeric" | new_valuetype=="integer") if (!is.numeric(new_minallowedvalue) & !is.integer(new_minallowedvalue)) stop("valuetype numeric of integer and min value not of this type") mydb <- call.mydb() new_data_renamed <- tibble(type = new_type, valuetype = new_valuetype, maxallowedvalue = ifelse(is.null(new_maxallowedvalue), NA, new_maxallowedvalue), minallowedvalue = ifelse(is.null(new_minallowedvalue), NA, new_minallowedvalue), typedescription = ifelse(is.null(new_typedescription), NA, new_typedescription), factorlevels = ifelse(is.null(new_factorlevels), NA, new_factorlevels), expectedunit = ifelse(is.null(new_expectedunit), NA, new_expectedunit), comments = ifelse(is.null(new_comments), NA, new_comments)) print(new_data_renamed) Q <- choose_prompt(message = "confirm adding this type?") if(Q) DBI::dbWriteTable(mydb, "subplotype_list", new_data_renamed, append = TRUE, row.names = FALSE)
add_taxa_table_taxa()
Add formatted taxa information
add_trait()
Add trait
add_trait_taxa()
Add a trait in species trait list
add_traits_measures()
Add an observation in trait measurement table
approximate_isolated_xy()
Interpolate x y position based on neighnour
call.mydb()
Get primary database connection (wrapper)
call.mydb.taxa()
Get taxa database connection (wrapper)
check_taxa_permissions()
Check taxa database permissions
choose_growth_form()
Choose growth forms
choose_prompt()
Choose from prompt
cleanup_connections()
Cleanup all database connections
connect_database()
Connect to database
country_list()
List of countries
create_db_config()
Create local DB config file
db_diagnostic()
Complete database diagnostic
define_read_only_policy()
Helper functions for common policy scenarios
define_user_policy()
Define user policy for row-level security
detect_direct_changes()
Detect changes in direct columns with visual display
divid_plot()
Divid into quadrats a 1ha plot
.add_link_specimens()
Add link between specimen and individual
.comp_print_vec()
Compare two row-tibbles and generate HTML with differences
.delete_colnam()
Delete an entry in colnam table
.delete_entry_sp_trait_measure()
Delete an entry in traits measurements table
.delete_entry_trait_measure()
Delete an entry in trait measurement table (individuals features)
.delete_entry_trait_measure_features()
Delete an entry in trait measurement features table
.delete_individual_feature_type()
Delete an entry in individual feature table
.delete_individuals()
Delete an entry in individuals table
.delete_link_individual_specimen()
Delete an entry in trait measurement table
.delete_plot()
Delete an entry in plot meta-data
.delete_sp_trait_list()
Delete an entry in species trait list
.delete_specimens()
Delete an entry in specimen table
.delete_subplotfeature()
Delete an entry in data_liste_sub_plots features
.delete_subplotfeature_feat()
Delete an entry in data_liste_sub_plots features
.delete_subplottype()
Delete an entry in subplotype_list table
.delete_trait_list()
Delete an entry in trait list
.find_cat()
Internal function
.find_ids()
Internal function
.find_similar_string()
Internal function
.link_sp_trait()
Internal function
.link_subplotype()
Internal function
.link_table()
Internal function
.link_trait()
Internal function
.pairwise_string_similarity()
Internal function
.query_unmatched_specimens()
Internal function
.split_censuses()
Split plot data into census
.time_diff()
Add time difference in number of days for two census
.trim.growth()
Identify potential errors for estimating growth
enrich_with_traits()
Enrich individuals with all traits
explore_allometric_taxa()
Explore allometric relation
extract_corners()
Extract all corners of 1ha plot
func_try_fetch()
Safely execute a SQL query with automatic retry
get_connection_info()
Get connection information
get_database_fk()
Get database foreign keys
get_individual_aggregated_features()
Aggregate individual features to individual level
get_plot_rel_xy()
Project stems in geographical space
get_ref_specimen_ind()
Find unlinked individual
get_updates_diconame()
Get backups of modified taxonomic data
growth_computing()
Growth computing for multiple census
latlong2UTM()
Get UTM from geographical coordinates
launch_stand_tax_app()
Launch shiny app for taxonomic standardization
launch_taxonomic_match_app()
Launch Taxonomic Name Standardization App
list_individual_features()
List all available individual features
list_user_policies()
List user policies
match_tax()
Query and standardize taxonomy
match_taxonomic_names()
Match taxonomic names to backbone with intelligent SQL-side strategy
merge_individuals_taxa()
Merge individual records with taxonomic information
method_list()
List of method
model_wd_2
model_wd_1
phylo_tree model_wd_2
phylo_tree
print(<plot_query_list>)
Print method for plot_query_list
print_connection_status()
Print connection status
print_table()
print table as html in viewer
process_individuals()
Process individuals for query_plots
process_stems()
Process multiple stems
process_trimble_data()
Process trimble data
proj_rel_xy()
Project stems in geographical space
query_colnam()
Query in colnam table
query_individual_features()
Query individual features with improved architecture
query_link_individual_specimen()
Query link between specimens and individuals
query_plot_features()
Query subplot features with improved architecture
query_plots()
Query plots from database
query_specimens()
Exploring specimens data
query_taxa()
List, extract taxa
query_taxa_traits()
Query traits at the taxonomic level
query_trait()
Query in taxa trait table
query_traits_measures_features()
Query features associated with trait measurements
remove_db_credentials()
Remove stored credentials
replace_NA()
Query fuzzy match
setup_db_credentials()
Setup credentials storage in environment variables
species_plot_matrix()
Get species-plot data frame
standardize_taxonomic_batch()
Standardize taxonomic names in a data frame
subplot_list()
List all available subplot types
summarize_feature()
Get summary statistics for a specific feature
table_taxa_tb
Table taxa
test.order.subplot()
Check the order of subplots in a given data frame
test_connection()
Test database connection
traits_list()
List of trait and features potentially liked to individual
traits_taxa_list()
List of trait
try_open_postgres_table()
Try to open PostgreSQL table
update_dico_name()
Update taxonomic data
update_dico_name_batch()
Update diconame data based on id of taxa
update_ident_specimens()
Update specimens table
update_link_specimens_batch()
Update plot data data
update_records()
Update records with optional single-record comparison display
update_specimens_batch()
Update specimens data data
update_taxa_link_table()
Update local taxonomy link table