powered by
geom_hinton()
Generic function that dispatches to a method appropriate for x. Built-in methods exist for matrix, data.frame, and table.
x
matrix
data.frame
table
as_hinton_df(x, ...)# S3 method for matrix as_hinton_df(x, ...)# S3 method for data.frame as_hinton_df( x, rowname_col = "row", colname_col = "col", value_col = "weight", ... )# S3 method for table as_hinton_df(x, ...)# S3 method for default as_hinton_df(x, ...)
# S3 method for matrix as_hinton_df(x, ...)
# S3 method for data.frame as_hinton_df( x, rowname_col = "row", colname_col = "col", value_col = "weight", ... )
# S3 method for table as_hinton_df(x, ...)
# S3 method for default as_hinton_df(x, ...)
A data frame suitable for use with geom_hinton().
An object to convert.
Additional arguments passed to the method.
Name of the column that holds the row index. Default "row".
"row"
Name of the column that holds the column index. Default "col".
"col"
Name of the column that holds the matrix values. Default "weight".
"weight"
m <- matrix(c(1, -2, 3, -4), 2, 2) as_hinton_df(m) t <- table(c("a","b","a"), c("x","y","x")) as_hinton_df(t)
Run the code above in your browser using DataLab