Description Usage Arguments Examples
This function swaps out NA values in an object (vector, matrix - call with lapply for lists) while retaining dimensions and names. If no NA values are found, the object is returned as is.
1 | swap_na(possNAs, swap = 0)
|
possNAs |
An R object that may or may not contain NA values. |
swap |
The value to swap NA for. Defaults to 0. Changing to a character value after inputting only numerical values will change ALL numbers to characters if using a matrix. |
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.