Description Usage Arguments Value See Also Examples
Reformat a tbl_df table into a matrix
1 2 3 | tbl_df_to_matrix(a_table, row_name, col_name, value_name)
tbl_df_to_matrix_(a_table, row_name, col_name, value_name)
|
a_table |
a tbl_df object with column names |
row_name |
column of |
col_name |
column of |
value_name |
column of |
a matrix
1 2 3 4 5 6 | input_data <- dplyr::data_frame(a = rep(letters[1:3], each = 3),
b = rep(LETTERS[1:3], times = 3),
c = 1:9, extra_field = 2:10)
tbl_df_to_matrix(input_data, a, b, c)
tbl_df_to_matrix_(input_data, "a", "b", "c")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.