View source: R/param_convert.r
param_convert | R Documentation |
param_unconvert
)
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.
param_convert(x,param)
param_unconvert(x,param)
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 |
Robert K. Bauer
param_unconvert, readbin
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.