Description Usage Arguments Details Value Examples
ggplot2 dataframe from NMF image data
1 | NMFimage2df(nmfimage, rs, cs)
|
nmfimage |
- data for NMF - each row is an image |
rs |
- number of rows in each image |
cs |
- number of cols in each image |
transform a typical basis data frame to something that can be displayed as images with ggplot2. Each image is a row and the dimensions need to be passed in.
data frame for use with ggplot2
1 2 3 4 | data(faces)
j<-NMFimage2df(faces, 32, 32)
ggplot(filter(j, ID <= 16), aes(x=Var2, y=33-Var1, fill=Brightness)) +
geom_tile() + facet_wrap(~ID) + scale_fill_gradient(low="black", high="white")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.