mapicesrect: This function map a variable defined on ICES statistical...

Description Usage Arguments Value Author(s) Examples

Description

This function map a variable defined on ICES statistical rectangles

Usage

1

Arguments

data:

a data frame

var:

the variable position (a numerical vector) or name (a character vector) in data. This variable should be numeric.

rect:

the ICES statistical rectangle position (a numerical vector) or name (a character vector) in data

Value

a ggplot plot

Author(s)

Laurent Dubroca

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
load("ICESAreaRects.rdata")
datatmp<-data.frame(StatRect=sample(gsub(" ","",ICESAreaRects$StatRect),1000,replace=T),landWt=rnorm(1000,mean=1000,sd=300),month=sample(1:12,1000,replace=T))
pipo<-mapicesrect(datatmp[1:10,],2,1)
listid<-unique(ices_areas_df$id)
ggplot(ices_areas_df[ices_areas_df$id%in%listid[13:65],])+
	geom_path(aes(long,lat,group=group,coutour="grey"))

	geom_polygon(aes(long,lat,group=group,fill=id,coutour="grey"))#+guides(fill=guide_legend(ncol=3))

ggplot(ices_areas_df[ices_areas_df$id%in%listid[1:12],],aes(x=long,y=lat,group=id))+
geom_path()

  	
## End(Not run) 

  

ldbk/fishPifct documentation built on May 20, 2019, 11:28 p.m.