vec2img: Visualize image from vector (a row from dataframe)

Description Usage Arguments Value Examples

Description

Visualize image from vector (a row from dataframe)

Usage

1
vec2img(df, nrow, w, h)

Arguments

df

A dataframe WITHOUT rownames. Each row contents the pixels values of one image (as.vector). the length of the vector must to be the same for all images.

nrow

numeric, the number of row want to be plot.

w

wide of the image in pixels

h

height of the image in pixels

Value

plot image

Examples

1
2
3
4
5
## Not run: 
mat <- matrix(rnorm(2500, mean=65, sd=4.58), nrow= 25, ncol = 100)
vec2img(mat, 3, 10,10)

## End(Not run)

kmezhoud/papSmear documentation built on May 25, 2019, 8:32 p.m.