param_convert {oceanmap} | R Documentation |
converts byte data to absolte values or vise versa (param_unconvert
)
Description
converts byte data as stored in '.gz'
-files to absolte values (param_convert
) or vise versa (param_unconvert
) using the parameter_definitions-dataset. param_convert
is used by readbin, param_unconvert
is used by writebin.
Usage
param_convert(x,param)
param_unconvert(x,param)
Arguments
x |
vector, matrix or raster-object holding byte-data that that should be converted to absolute values ( |
param |
Character string indicating parameter of the dataset to be treated. See |
Author(s)
Robert K. Bauer
See Also
Examples
library('fields')
path <- system.file("test_files", package="oceanmap")
gz.file <- Sys.glob(paste0(path,'/*.gz'))[1] # load sample-'.gz'-files
param <- name_split(gz.file)$parameter
print(param)
## converted data, according to param information
m <- readbin(gz.file, Raster=FALSE)
image.plot(m)
## byte data ("unconverted") according to param information, as stored in ".gz"files
bin <- param_unconvert(m,param)
image.plot(bin)
## reconverting byte data, according to param information
conv <- param_convert(bin,param)
image.plot(conv)
[Package oceanmap version 0.1.6 Index]