This file contains 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
is.invasive() | |
##Description## | |
#This function check which species (both plants and animals) are considered "invaders" somewhere in the | |
# world. For that end, it checks GISD (http://www.issg.org/database/welcome/) and returns a value, either | |
#"Not invasive" or the brief description presented in GISD. Note that the webpage contains more | |
#information. Also note that the function won't tell you if it's exotic in your area, a lot of exotic | |
#species are not considered invaders (yet). As expected, the function is as good as the database is, which | |
#I find quite reliable and well maintained. The database is also able to recognize a lot (but not all) of |
This file contains 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
#who are the pollinators? (a plot) | |
#http://ibartomeus.wordpress.com/2012/12/17/who-are-the-pollinators | |
#enter data manually | |
d <- matrix(nrow = 6, ncol = 7) | |
d[,1] <- c(20.000, 10, 10, 10, 200.000, 100) | |
d[,2] <- c(6.000, 4, 8, 9, 100.000, 20) | |
d[,3] <- c(14.500, 6, 4, 9, 80.000, 4) | |
d[,4] <- c(30.000, 7, 2, 7, 50.000, 3) | |
d[,5] <- c(0.328, 10, 2, 3, 1.000, 5) |
This file contains 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
library(plotrix) | |
#manually enter data | |
d <- data.frame( | |
Bee_group = c("Bombus", "Dark", "Green", "Lasioglossum"), | |
Efficiency = c(106.86207, 81.50000, 80.66667, 59.27586), | |
Eff_SE = c(15.56551, 20.12130, 17.97529, 12.25689), | |
Visitation = c(2.8333333, 0.2222222, 2.2222222, 5.6666667), | |
Visit_SE = c(0.8333333, 0.1008317, 0.7119684, 1.0966378) | |
) | |
#create a grid with value x (visitation), y (efficiency) and z = x*y. |
This file contains 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 approach to assess multifunctionality is based in the idea that sites providing | |
# best multiple functions will have not only a high mean value across function | |
# (approach 3 in Byrnes et al.) but also low variability in the function delivered | |
# across functions (i.e. Coef of var). | |
#I use Byrnes multifunc package to ilustrate it. | |
library(devtools) | |
install_github("multifunc", "jebyrnes") | |
library(multifunc) | |
library(ggplot2) |
This file contains 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
--- | |
title: "Preferring a preference index" | |
author: "I. Bartomeus" | |
output: html_document | |
--- | |
I've been reading about preference indexes lately, speciphically for characterizing pollinator preferences for plants, so here is what I learnt. Preference is defined as using an item (e.g. plant) more than expected given the item abundance. | |
First I like to use a quantitative framework (you can use ranks-based indices as in Williams et al 2011, which has nice propiertiest too). The simpliest quantitative index is the forage ratio: |
This file contains 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 shows how to get the random slopes and CI's for each level in a hierarchical model | |
#dataset used | |
head(iris) | |
#what we want to investigate | |
#Is there a general relationship? and how it differs by species | |
plot(iris$Sepal.Width ~ iris$Petal.Width, col = iris$Species, las =1) | |
#Our model with random slope and intercept |
This file contains 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
#Explore CIS data | |
#load data---- | |
load("barometro_enero.RData") | |
head(barometro) | |
str(barometro) | |
head(nombres_etiquetas) | |
nombres_etiquetas |
This file contains 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
#SevillaR talk | |
#The problem: | |
time <- c(2000:2015) | |
abundance <- rnorm(16, 150, 50) #poison?? | |
plot(abundance ~ time, t = "l") | |
#can I detect a trend? |
This file contains 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
--- | |
title: "Sevillarusers - ggplot2 intro" | |
author: "Ra?l Ortiz" | |
date: "Tuesday, October 27, 2015" | |
output: pdf_document | |
--- | |
# Introducci?n al paquete gr?fico "ggplot2". | |
## Establezco el directorio de trabajo. |
This file contains 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
#I have >1000 bees to check its name, so I want to automatize taxize for | |
# fixing misspellings when possible | |
# updating synonims to accepted names | |
# keeping ONLY accepted species (fully resolved at species level) | |
# this uses taxize > 0.7.6.9157 If you are using older version (e.g. what its now on CRAN) see the history of this file. | |
library(taxize) | |
library(dplyr) | |
#example: good, synomin, typo, unexisting, genus only. |
OlderNewer