https://github.com/cran/fields
Raw File
Tip revision: 8182a9a01e5ac26047a101825b76f85617a37cf8 authored by Doug Nychka on 06 February 2009, 21:36:12 UTC
version 5.02
Tip revision: 8182a9a
summary.ncdf.R
# fields, Tools for spatial data
# Copyright 2004-2007, Institute for Mathematics Applied Geosciences
# University Corporation for Atmospheric Research
# Licensed under the GPL -- www.gpl.org/licenses/gpl.html

"summary.ncdf" <-
function( object,...){

for ( i in 1:object$nvars ){

   vname = object$var[[i]]$name    # variable name
   ndims = object$var[[i]]$ndims   # number of dimensions for this variable

   dimstring = paste(vname,'( variable ',as.character(i),') has shape')
   for (j in 1:ndims) {
      dimstring <- paste(dimstring, 
        as.character(object$var[[i]]$dim[[j]]$len))
   }

   cat(dimstring, fill=TRUE)
}
}
back to top