Commit f1e436f7 authored by Franssen, Wietse's avatar Franssen, Wietse
Browse files

a small thing

parent d0888d44
......@@ -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
......
......@@ -4,7 +4,7 @@
\alias{r2ggplotDataStructure}
\title{Plot a simple map}
\usage{
r2ggplotDataStructure(data)
r2ggplotDataStructure(data, timestep = 1)
}
\description{
Plot a simple map
......
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