This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is a quick demo performed for Sevilla R users group | |
#Elena asked about IUCN data. You can retrive this data using taxize: https://github.com/ropensci/taxize | |
#Elena also suggested vectorbase can be scrapped. Maybe for the next hackaton? | |
#package OriginR | |
library(originr) | |
#define species (don't worry about typos) | |
sp <- c("Apis mellifera", "carpobrotus edulis", "Lavandula stoechas", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Calculate how many sets there are in a set game. | |
#each card has 4 characteristics with 3 factors each | |
color <- c("red", "green", "purple") | |
shape <- c("round", "diamond", "curly") | |
texture <- c("fill", "empty", "striped") | |
number <- c("one", "two", "three") | |
create_board <- function(n = 12){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#question: Can we create an heuristic to parse this type of data: | |
#Input example: | |
Halictus crenicornis | |
GALICIA: 1♀, Monte do Gozo, Santiago de Compostela (La Coruña), 350 m, 5.VIII.2016, 29TNH404481. – 1♀, Río Castro, Cerdedo (Pontevedra), 20.VII.1996. – 1♀, Oca (Pontevedra), 20.VII.1996. | |
ASTURIAS: 1♂, 1♀, Raitán, Carreño (Asturias), 130 m, 30TTP72, 17.VIII.2005. – 1♀, Poreño, Villaviciosa (Asturias), 43,426443º, -5,445950º, 13.V.2015, sobre flor de Centaurea nigra, C. Guardado leg. – 1♀, Poreño, Villaviciosa (Asturias), 43,426443º, -5,445950º, 27.V.2014, M. Miñarro leg. – 1♀, Muñiz (Asturias), 14.VII.2016, sobre flor de Taraxacum, D. Luna leg. | |
#Desired output (csv): | |
Species, CCAA, female, male, locality, province, elevation, date, UTM, latitude, longitude, notes | |
Halictus crenicornis, Galicia, 1, 0, "Monte do Gozo, Santiago de Compostela", La Coruña, 350, 5.VIII.2016, 29TNH404481, NA, NA, NA |
OlderNewer