Hello,

I am trying to ask the user for which column their data is in, and then use
this information in a function.  So far I have:

data <- read.csv(file.choose(), header=TRUE)
col <- (winDialogString("Which column contains your data?",""))

and I want to be able to reference such as:

meas <- data$col

and use this meas in the function.

However, I can't seem to get this to work because the input is read into a
string, and I can't figure out how to convert this string to the vector
name that I want.

Any help is appreciated.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to