Commit 0deed334 authored by Franssen, Wietse's avatar Franssen, Wietse
Browse files

changed date output in ggplotje

parent cc4f7141
......@@ -10,7 +10,6 @@
plotje <-function(data, title = NULL) {
if (is.null(title)) {
if (!is.na(data$Dates$start[1])) {
title=paste0(data$Variable$longName, " [",data$Variable$units,"]\n(" ,data$Dates$start[1], ")")
} else {
title=paste0(data$Variable$longName, " [",data$Variable$units,"]")
......@@ -123,7 +122,7 @@ r2ggplotDataStructure <-function(data, timestep = 1) {
ggplotje <-function(rdata,lon = NULL, lat = NULL) {
if (!is.na(rdata$Dates$start[1])) {
# title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]\n(" ,rdata$Dates$start[1], ")")
title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]\n(" ,as.character(as.Date(rdata$Dates$start[1])), ")")
title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]\n(" ,as.character(format( as.Date(data$Dates$start[1]),format="%d %B %Y")), ")")
} else {
title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]")
}
......
Supports Markdown
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