BotanizeR_quiz.Rd
Navigates randomly through a species list, shows defined pictures and descriptions and other hints and let's the user guess the species name. Number of tries and attempts are used to calculate scores that will be used to update probabilities for the random sampling of subsequent species.
BotanizeR_quiz( species_list, image_floraweb = TRUE, hints_floraweb = c("description", "status", "habitat", "family", "German name"), image_ukplantatlas = FALSE, hints_ukplantatlas = NULL, imagelinks_custom = NULL, image_folders = NULL, hints_custom = NULL, case_sensitive = TRUE, file_location = "temporary", startat = 0, init_count = NA, init_score = NA, init_attempts = NA, max_attempts = 10, image_width = 500 )
species_list | a data.frame including the species that shall be
practiced and which will be retrieved information for using
|
---|---|
image_floraweb | logical that defines if images from FloraWeb shall be retrieved. |
hints_floraweb | character vector defining the hints to retrieve from FloraWeb. 'hints_floraweb' must be either NULL or a character string with the wanted hints from c('map', 'description', 'status', 'habitat', 'family', 'German name'). |
image_ukplantatlas | logical that defines if images from the Online Atlas of the British and Irish flora shall be retrieved. |
hints_ukplantatlas | character vector defining the hints to retrieve from the Online Atlas of the British and Irish flora. 'hints_ukplantatlas' must be either NULL or a character string with the wanted hints from c('mapuk', 'familyuk', 'ecology', 'statusuk', 'trends', 'perennation', 'lifeform', 'woodiness', 'clonality'). |
imagelinks_custom | character vector defining columns of |
image_folders | character vector defining folders from which to retrieve images. Image file names need to contain the species names to be found. |
hints_custom | character vector defining custom hints to use.
Note: In that case, these hints should be stored in |
case_sensitive | logical indicating whether cases need to match when guessing a species name. |
file_location | character vector defining a location to temporarily store the images retrieved from online resources. If put to "temporary", R will create a temporary folder automatically. |
startat | numeric indicating how many species have already been practiced in this session. Should be 0 when running the function and will be consecutively increased when the function calls itself. |
init_count | numeric indicating how many times overall species have
already been practiced. If set to |
init_score | numeric indicating how many times overall species have
been named correctly. If set to |
init_attempts | numeric indicating how many attempts have been used
overall across all species so far. If set to |
max_attempts | numeric defining the number of attempts allowed per species before moving on to next species |
image_width | numeric defining to what width of the images shall be
rescaled before plotting in case |
A data.frame like species_list
with updated scores and counts per species.
After running the main function BotanizeR_quiz() you need to click into the console to enter the species name in there. If you have no clue, press enter and the next hint will appear (you have ten tries). If you type the name slightly wrong the function will tell you. If the genus is correct it will also tell you. It shows several photos if available. If you want to skip a species write "skip". If you want to cancel the quiz write "exit". Don't hit Esc if you want to save your progress. The function counts your attempts and successes and uses this as sampling probabilities for choosing the species randomly. The better you know a species the less likely it will be shown again.
Weigelt, P., Denelle, P., Brambach, F. & Kreft, H. (2021) A flexible R package with Shiny app to practice plant identification for online teaching and beyond. PLANTS, PEOPLE, PLANET, https://doi.org/10.1002/ppp3.10226.
# Load species list for UK, Ireland and Germany based on floraweb.de and the # Online Atlas of the British and Irish flora # (https://www.brc.ac.uk/plantatlas/) data(BotanizeR_species) # Subset for about 700 species known from Sussex, UK BotanizeR_Sussex <- BotanizeR_species[which(BotanizeR_species$UK_Ireland_Sussex==1), ] if (FALSE) { # Type in species name, or press enter for next hint or type "skip" and # press enter for next species or type "exit" to end quiz and save results BotanizeR_Sussex_practiced <- BotanizeR_quiz(species_list = BotanizeR_Sussex, image_floraweb = FALSE, image_ukplantatlas = TRUE, hints_ukplantatlas = c('mapuk', 'familyuk', 'ecology', 'statusuk', 'trends', 'perennation', 'lifeform', 'woodiness', 'clonality'), hints_floraweb = NULL, case_sensitive = FALSE) # Subset for about 300 species students in Goettingen, Germany, learn BotanizeR_Germany <- BotanizeR_species[which(BotanizeR_species$Germany_summer==1 | BotanizeR_species$Germany_BioDiv==1), ] # Type in species name, or press enter for next hint or type "skip" and # press enter for next species or type "exit" to end quiz and save results BotanizeR_Germany_practiced <- BotanizeR_quiz(species_list = BotanizeR_Germany, hints_floraweb = c("description", "status", "habitat","family","German name"), case_sensitive = FALSE) # If you want to include distribution maps as hints add "map" to hints; # This increases the download times a bit BotanizeR_Germany_practiced <- BotanizeR_quiz( species_list = BotanizeR_Germany, hints_floraweb = c("map","description","status", "habitat", "family", "German name"), case_sensitive = FALSE) # If you want to keep track of your progress, you can save the species list # with updated scores locally and load it in the next session ### example for three species with custom hints and images BotanizeR_Germany_custom <- BotanizeR_Germany_practiced[ which(BotanizeR_Germany_practiced$SPECIES %in% c("Acer campestre", "Erica carnea", "Melampyrum nemorosum")),] custom_species_trained <- BotanizeR_quiz( species_list = BotanizeR_Germany_custom, image_floraweb = TRUE, hints_floraweb = NULL, hints_custom = c("ownhint_Description", "ownhint_Distribution"), imagelinks_custom = c("imagelink_1", "imagelink_2"), image_folders = NULL, case_sensitive = FALSE) }