You can use eval
and parse
:
foo <- eval(parse(text = paste("mean(x,", myoptions, ")")))
More Related Contents:
- Convert string to a variable name
- Making a string concatenation operator in R
- Removing html tags from a string in R
- Call functions with special prefix/suffix
- How to split a string into substrings of a given length? [duplicate]
- How to convert variable (object) name into String [duplicate]
- Load R package from character string
- Getting and removing the first character of a string
- How to return a string value from a Bash function
- pass character strings to ggplot2 within a function
- Insert a character at a specific location in a string
- Convert R vector to string vector of 1 element [duplicate]
- as.numeric with comma decimal separators?
- Count word occurrences in R
- converting datetime string to POSIXct date/time format in R
- Extract numeric part of strings of mixed numbers and characters in R
- How can I remove repeated characters in a string with R?
- How to collapse a list of characters into a single string in R
- Split a character vector into individual characters? (opposite of paste or stringr::str_c)
- Repeat and concatenate a string N times
- Extract the first (or last) n characters of a string
- Insert line breaks in long string — word wrap
- How to combine multiple character columns into a single column in an R data frame
- Ignore escape characters (backslashes) in R strings
- Generate list of all possible permutations of a string
- Does swift have a trim method on String?
- Implementing String.Format() in VB6
- Replace substring of NSAttributedString with another NSAttributedString
- How can I replace newline characters using JSP and JSTL?
- Remove all line breaks at the beginning of a string in Swift