[Stacomir-commits] r296 - pkg/stacomir/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Feb 27 16:45:11 CET 2017
Author: briand
Date: 2017-02-27 16:45:11 +0100 (Mon, 27 Feb 2017)
New Revision: 296
Modified:
pkg/stacomir/R/BilanMigrationInterAnnuelle.r
Log:
Error in plot(plot.type="seasonal") we forgot to build the sum per timesplit
Modified: pkg/stacomir/R/BilanMigrationInterAnnuelle.r
===================================================================
--- pkg/stacomir/R/BilanMigrationInterAnnuelle.r 2017-02-27 15:12:31 UTC (rev 295)
+++ pkg/stacomir/R/BilanMigrationInterAnnuelle.r 2017-02-27 15:45:11 UTC (rev 296)
@@ -908,9 +908,11 @@
dat3<-fn_getbacktodate(dat=dat3,
col=c("Q0","Q5","Q50","Q95","Q100","d90"),
timesplit_=timesplit)
-
-
- g<-ggplot(data=datadic)+
+ datadic1<-dplyr::select_(datadic,timesplit,"bjo_annee","bjo_valeur")
+ datadic1<-dplyr::group_by_(datadic1, "bjo_annee",timesplit)
+ datadic1<-dplyr::summarize(datadic1,bjo_valeur=sum(bjo_valeur))
+ datadic1<-dplyr::ungroup(datadic1)
+ g<-ggplot(data=datadic1)+
geom_rect(aes(xmin = Q0,xmax = Q100,ymin=year-0.5,ymax=year+0.5),fill="grey90",data=dat3)+
geom_tile(aes_string(x=timesplit,y="bjo_annee", fill = "bjo_valeur"),color=ifelse(timesplit=="jour","transparent","grey80"))+
scale_fill_distiller(palette = "Spectral", name="Effectif")+
More information about the Stacomir-commits
mailing list