| rmByName | R Documentation | 
This function removes elements from an indexable object (e.g., a named vector or list) where the names match a specified regular expression.
rmByName(x, pattern, silent = FALSE)
| x | An indexable object (e.g., a named vector, list, or data frame). | 
| pattern | A character containing a regular expression(s) to match the names of elements to be removed. | 
| silent | A logical indicating whether to silence a warning if no names are detected. | 
The input object with elements removed based on the name regex.
myList <- list(a = 1, b_test = 2, c = 3, d_test = 4)
rmByName(myList, "_test")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.