Skip to content

Instantly share code, notes, and snippets.

@aammd
Created July 20, 2015 15:56
Show Gist options
  • Save aammd/58f205c6fbaa1e6c67d5 to your computer and use it in GitHub Desktop.
Save aammd/58f205c6fbaa1e6c67d5 to your computer and use it in GitHub Desktop.
One of the oldest .R scripts of mine I can find, 5y old
source("fn.incidence.R")
insect<-read.csv("insect.community.csv",sep=";")
brom<-read.csv("bromeliads.csv")
insect.pres <- insect
insect.pres[,3:27] <- as.numeric(insect.pres[,3:27]>0)
taxo.insect <- read.csv("Cardoso.insects.csv",sep=";")
insect.common <- commonize()
a.b <- sapply(1:dim(insect.common)[1],log.reg,simplify=FALSE)
a.b <- do.call(cbind,a.b)
A.star.data <- -a.b[1,]/a.b[2,]
max.slope <- a.b[2,]*0.25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment