Commit 884e63f4 authored by peguerin's avatar peguerin
Browse files

Rdata cells

parent 4d98a95e
###############################################################################
## Codes for the paper:
## Global determinants of freshwater and marine fish genetic diversity
## Authors :
## Stephanie Manel, Pierre-Edouard Guerin, David Mouillot,
## Simon Blanchet, Laure Velez, Camille Albouy, Loic Pellissier
##
## Montpellier, 2017-2019
## Nature communications, 2020
##
###############################################################################
# load library
library(raster)
library(sp)
library(rgdal)
library(rgeos)
###############################################################################
# functions
## from center of square coordinate (h,k) and length L return corner coordinates
......@@ -55,8 +73,13 @@ freshwaterRect=freshwaterRect[,c(3,4,6,7,10,11,12,13)]
cellsDat=rbind(marineRect,freshwaterRect)
watertype=c(rep("marine",dim(marineRect)[1]),rep("freshwater",dim(freshwaterRect)[1]))
cellsDat=cbind(cellsDat,watertype)
cellsID=data.frame(id=seq(1,dim(cellsDat)[1]))
cellsDat=cbind(cellsDat,cellsID)
###############################################################################
# SAVE DATA
save(cellsDat, file = "donnees/cellsDat.RData")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment