Turn data from 'plate form' to 'tidy form' and back
Usage
gp_unravel(df, rownames = NULL)
gp_reravel(df, row_name = ".row", col_name = ".col", values = "value")
Arguments
- df
The data.frame
in plate-form to be tidied
- rownames
Optional character. If there is a colname that specifies the
row index, it will be arranged by this column, then dropped.
Examples
test_plate <- matrix(sample(1:10, 96, replace = TRUE), nrow = 8, ncol = 12)
gp_unravel(test_plate)
#> # A tibble: 96 × 3
#> .row .col value
#> <int> <int> <int>
#> 1 1 1 7
#> 2 1 2 8
#> 3 1 3 2
#> 4 1 4 6
#> 5 1 5 1
#> 6 1 6 8
#> 7 1 7 3
#> 8 1 8 3
#> 9 1 9 9
#> 10 1 10 7
#> # ℹ 86 more rows