Description Usage Arguments Value Author(s) Examples
This function map a variable defined on ICES statistical rectangles
1 | mapicesrect(data, var, rect)
|
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 |
a ggplot plot
Laurent Dubroca
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.