numeric_output: Get numeric output only

Description Usage Arguments Details Value Note See Also

View source: R/numeric_output.R

Description

This function strips of strips off the non-numeric part of a string that contains ": " in it.

Usage

1

Arguments

str

Either a string or any other object

Details

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 ": ".

Value

Returns a string with only numeric output if the input string contains ":"; otherwise, returns the input as it is.

Note

This is a helper function used inside run.

See Also

sapply,gsub,all,grepl


ArkaB-DS/nlsCompare documentation built on Jan. 1, 2022, 2 p.m.