@r-project.org] On
> Behalf
> Of John Sorkin
> Sent: Wednesday, January 29, 2014 3:48 PM
> To: r-help@r-project.org
> Subject: [R] Use function parameter as an unevaluated text string
>
> I would like to take a parameter passed to a function as a text string. I
> don'
doit <- function(data) {
cat("This function is using values from the data frame",
deparse(substitute(data)), "\n")
}
On Wed, Jan 29, 2014 at 6:48 PM, John Sorkin
wrote:
> I would like to take a parameter passed to a function as a text string. I
> don't want the parameter evaluated, I want it u
I would like to take a parameter passed to a function as a text string. I don't
want the parameter evaluated, I want it uses exactly as passed,
doit <- function(data) {
cat("This function is using values from the data frame ",data,"\n")
}
mydata <- data.frame(x = c(1,2,3), y=c(3,2,1))
doit(myd
3 matches
Mail list logo