Description Usage Arguments Methods (by class) See Also
Replaces strings matching the pattern in the names of the object by the replacement. If applicable, both row and column names could be replaced. This function is a simple wrapper to str_replace_all
Default method that replaces names(object)
Replaces row.names in the object, then dispatches to the default
Replace row.names and col.names in the object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | replace_names(object, pattern, replacement, ...)
## Default S3 method:
replace_names(object, pattern = "\\.",
replacement = " ", ...)
## S3 method for class 'data.frame'
replace_names(object, pattern = "\\.",
replacement = " ", replace_rownames = TRUE, replace_colnames = TRUE,
...)
## S3 method for class 'matrix'
replace_names(object, pattern = "\\.", replacement = " ",
replace_rownames = TRUE, replace_colnames = TRUE, ...)
|
object |
Object of which the names are to be changed |
pattern |
Pattern to look for, as defined by a POSIX regular expression |
replacement |
Replacement string |
... |
extra arguments to |
replace_rownames |
Logical. Should row names be replaced? |
replace_colnames |
Logical. Should column names be replaced? |
default
: Replace names of an object
data.frame
: Replace names of a data.frame
matrix
: Replace names in a matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.