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
f1e436f7
Commit
f1e436f7
authored
Mar 17, 2015
by
Franssen, Wietse
Browse files
a small thing
parent
d0888d44
Changes
2
Hide whitespace changes
Inline
Side-by-side
R/WFRTools.R
View file @
f1e436f7
...
...
@@ -290,12 +290,14 @@ ncLoad <-function(file, varName = NULL, lonlatbox = NULL, timesteps = NULL, z =
}
else
{
data
$
Data
<-
ncvar_get
(
ncFile
,
varName
,
start
=
c
(
LonIdx
[
1
],
LatIdx
[
1
],
z
,
timeIdx
[
1
]),
count
=
c
(
length
(
LonIdx
),
length
(
LatIdx
),
1
,
length
(
timeIdx
)))
}
if
(
length
(
dim
(
data
$
Data
==
2
)
))
{
if
(
length
(
dim
(
data
$
Data
))
==
2
)
{
data
$
Data
<-
aperm
(
data
$
Data
,
c
(
2
,
1
))
}
else
if
(
length
(
dim
(
data
$
Data
==
2
)))
{
attr
(
data
$
Data
,
"dimensions"
)
<-
rev
(
ncCheckResult
$
dims
[
1
:
2
])
}
else
if
(
length
(
dim
(
data
$
Data
))
==
3
)
{
data
$
Data
<-
aperm
(
data
$
Data
,
c
(
3
,
2
,
1
))
attr
(
data
$
Data
,
"dimensions"
)
<-
rev
(
ncCheckResult
$
dims
)
}
attr
(
data
$
Data
,
"dimensions"
)
<-
ncCheckResult
$
dims
#
attr(data$Data,"dimensions") <-
rev(
ncCheckResult$dims
)
data
$
Variable
$
varName
<-
varName
## Fill attributes
...
...
man/r2ggplotDataStructure.Rd
View file @
f1e436f7
...
...
@@ -4,7 +4,7 @@
\alias{r2ggplotDataStructure}
\title{Plot a simple map}
\usage{
r2ggplotDataStructure(data)
r2ggplotDataStructure(data
, timestep = 1
)
}
\description{
Plot a simple map
...
...
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