Learn R Programming

enhancer (version 1.1.0)

simage: Image of sparsity between two variables

Description

image for sparsity.

Usage

simage(data, Var1=NULL, Var2=NULL, ...)

Value

vector of image

Arguments

data

model data of class "data.frame"

Var1

variable to set in the x axis

Var2

variable to set in the y axis

...

Further arguments to be passed to the image function.

Author

Giovanny Covarrubias

See Also

Examples

Run this code

# row x column combinations existing

DT <- data.frame(Row=sort(rep(1:10,5)), Col=rep(1:5,10))
DT$Rowf <- as.factor(DT$Row)
DT$Colf <- as.factor(DT$Col)
DT <- DT[-1,] # remove one intentionally
simage(data=DT, Var1 = "Rowf", Var2 = "Colf")

# you can also inpect which cross combinations exist

Run the code above in your browser using DataLab