# library(plyr)
Dataset created to validate used locations by roe and red deer. For each of the five roe and red deer population 100 points were compared with a satellite layer (i.e., ground-truth). Hence, in total we did a validation of 500 points per species. For some locations we were not able to determine the ground-truth due to inclarity of the satellite layer. These locations have a missing value (NA) in the column ‘satellite’.
# # load data
# roe <- read.csv("../data/3_validation_gps/roe.csv",header=T, sep=',')
# red <- read.csv("../data/3_validation_gps/red.csv",header=T, sep=',')
#
# # change 0 and 1 to open and forest, respectively
# roe[which(roe$tcd==1),]$tcd <- 'forest'
# roe[which(roe$tcd==0),]$tcd <- 'open'
# red[which(red$tcd==1),]$tcd <- 'forest'
# red[which(red$tcd==0),]$tcd <- 'open'
# roe[which(roe$satellite==1),]$satellite <- 'forest'
# roe[which(roe$satellite==0),]$satellite <- 'open'
# red[which(red$satellite==1),]$satellite <- 'forest'
# red[which(red$satellite==0),]$satellite <- 'open'
# roe$punto <- NULL
# red$punto <- NULL
#
# head(roe)
# nrow(roe)
#
# head(red)
# nrow(red)
# ## confusion matrices
#
# #### roe ####
#
# ### absolute
# (roe_t <- table(roe[,c('tcd','satellite')]))
# ### proportion
# (roe_p <- prop.table(roe_t))
#
# #### red ####
#
# #### absolute
# (red_t <- table(red[,c('tcd','satellite')]))
# #### proportion
# (red_p <- prop.table(red_t))