View source: R/nctool-statistics.R
nc_quantile | R Documentation |
Calculate sample quantiles over the dimensions of a ncdf variable
nc_quantile( filename, varid, MARGIN = c(1, 2), na.rm = TRUE, probs = c(0, 0.5, 1), output = NULL, drop = TRUE, compression = NA, verbose = FALSE, force_v4 = TRUE, ignore.case = FALSE )
filename |
Name of the existing netCDF file to be opened. |
varid |
What variable to read the data from. Can be a string with the name of the variable or an object of class ncvar4. If set to NA, the function will determine if there is only one variable in the file and, if so, read from that, but if there are multiple variables in the file, an error is generated. |
MARGIN |
a vector giving the dimensions which the function will be applied over. It can be a character vector selecting dimension names. By default, the first two dimensions are taken. |
na.rm |
logical; if TRUE, any NA and NaN's are removed before the quantiles are computed. |
probs |
numeric vector of probabilities with values in [0,1]. Passed to stats::quantile. |
output |
Name of the file to save results. |
drop |
Logical. Drop degenered dimensions (i.e. dimensions of length 1)? Not implemented. |
compression |
If set to an integer between 1 (least compression) and 9 (most compression), this enables compression for the variable as it is written to the file. Turning compression on forces the created file to be in netcdf version 4 format, which will not be compatible with older software that only reads netcdf version 3 files. |
verbose |
Print debugging information. |
force_v4 |
If TRUE, then the created output file will always be in netcdf-4 format (which supports more features, but cannot be read by version 3 of the netcdf library). If FALSE, then the file is created in netcdf version 3 format UNLESS the user has requested features that require version 4. Deafult is TRUE. |
ignore.case |
If TRUE, ignore case in matching dimension names and MARGIN. Default is FALSE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.