Description Usage Arguments Details
First pixel is at the top-left of the image, subsequent pixels are filled along a row.
1 | write_pgm_r(image, filename)
|
image |
Integer values preferably, but numeric values allowed. Length should be nrow * ncol, but it is up to the caller to check. Values are not checked for the presence of NAs. |
filename |
Filename to write to. Will be silently overwriten if it already exists. |
If values
is of type double
, then they will be scaled to
integers in the range [0,255]
For write_pgm()
the caller is expected to have done all sanity
checking as the input is not checked for correctness, i.e.
Not checked that is.numeric(values)
Not checked that length(values) = nrow * ncol
Not checked that all integer values in range [0, 255] - Values outside the range [0,255] will be written modulo 256
Not checked that there are no NA values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.