Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Franssen, Wietse
WFRTools
Commits
cce388c8
Commit
cce388c8
authored
Mar 25, 2015
by
Franssen, Wietse
Browse files
little things
parent
b5f4785c
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/WFRTools.R
View file @
cce388c8
...
...
@@ -121,13 +121,13 @@ r2ggplotDataStructure <-function(data, timestep = 1) {
#' @export
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
],
")"
)
# datestring<-as.character(as.Date(data$Dates$start[1]))
# title=paste0(rdata$Variable$longName, " [",rdata$Variable$units,"]\n(" ,datestring, ")")
# 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
])),
")"
)
}
else
{
title
=
paste0
(
rdata
$
Variable
$
longName
,
" ["
,
rdata
$
Variable
$
units
,
"]"
)
}
data
<-
r2ggplotDataStructure
(
rdata
)
myPalette
<-
colorRampPalette
(
rev
(
brewer.pal
(
11
,
"Spectral"
)),
space
=
"Lab"
)
# myPalette <- colorRampPalette(rev(rainbow(100)), space="Lab")
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment