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
)

Arguments

species_list

a data.frame including the species that shall be practiced and which will be retrieved information for using BotanizeR_collect() It needs to contain at least the following columns: NAMNR, TAXONNAME, SPECIES and GENUS. The SPECIES column includes the species name (genus and epithet; character or factor) to be guessed and looked up in the online resources or image folders. The TAXONNAME column includes the full species name including additional information like, for example the authority (character or factor). The GENUS column includes the corresponding genus name (character or factor). NAMNR contains the ID (numeric) of the species used by FloraWeb. In case FloraWeb content is not retrieved, this may be NA.

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 species_list containing links (URLs) to retrieve images from the internet. These columns need to be available in species_list.

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 species_list in additional columns named like ownhint_HintName where HintName should be different than the hints allowed for hints_ukplantatlas and hints_floraweb.

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 NA, the function takes the sum of the column $COUNT in species_list.

init_score

numeric indicating how many times overall species have been named correctly. If set to NA, the function takes the sum of the column $SCORE in species_list.

init_attempts

numeric indicating how many attempts have been used overall across all species so far. If set to NA, the function takes the sum of the column $ATTEMPTS in species_list.

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 image_width is not NA.

Value

A data.frame like species_list with updated scores and counts per species.

Details

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.

References

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.

See also

Examples

# 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) }