mutate_matrix | R Documentation |
matrixset
objectApplies functions that takes matrices as input and return similar matrices.
The definition of similar is that the new matrix has the same dimension and
dimnames as .ms
.
If the returned matrix is assigned to a new matrix, this matrix is added to the
matrixset
object. If it is assigned to an already existing matrix, it
overwrites the matrix of the same name.
Setting a matrix value to NULL
will not delete the matrix, but will
create an empty slot (NULL
) for the matrix.
To delete a matrix, use the function remove_matrix()
. See examples below.
Note that matrices are created sequentially and can be used by other name-value pairs. There is an example that showcases this.
mutate_matrix(.ms, ...)
.ms |
A |
... |
Name-value pairs, ala
|
A matrixset
with updated matrices.
# Notice how FC can be used as soon as created
ms <- mutate_matrix(student_results,
FC = remedial/failure,
foo = NULL,
logFC = log2(FC),
FC = remove_matrix())
# this is NULL
matrix_elm(ms, "foo")
# running this would return an error, since FC was deleted
# matrix_elm(ms, "FC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.