Description Usage Arguments Details Value Note See Also
View source: R/numeric_output.R
This function strips of strips off the non-numeric part of a string that contains ": " in it.
1 |
str |
Either a string or any other object |
all(sapply(c("Mean",":"),grepl,str))
checks if both "Mean" and ":" are present in str
. If present, gsub("^.*: *","",str)
replaces everthing upto (including the whitespace after) ":" with an empty string. That is, it keeps only what is left after ": ".
Returns a string with only numeric output if the input string contains ":"; otherwise, returns the input as it is.
This is a helper function used inside run
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.