[R] Choosing a column for analysis in a function

2007-05-31 Thread Junnila, Jouni
Hello all, I'm having a problem concerning choosing columns from a dataset in a function. I'm writing a function for data input etc., which first reads the data, and then does several data manipulation tasks. The function can be then used, with just giving the path of the .txt file where the

Re: [R] Choosing a column for analysis in a function

2007-05-31 Thread Adaikalavan Ramasamy
Perhaps the use of as.character() like following might help? data.whole$Analyte.Values - data.whole$as.character(analyte) Junnila, Jouni wrote: Hello all, I'm having a problem concerning choosing columns from a dataset in a function. I'm writing a function for data input etc., which

Re: [R] Choosing a column for analysis in a function

2007-05-31 Thread Junnila, Jouni
Thank you for the tip. I already got a tip from Steve Ellison and it works for me. I'm now using data.whole$Analyte.Values - data.whole[[analyte]] and everything goes smoothly! I tested also your suggestion, but got the following error: attempt to apply non-function So I'm sticking with