search for: getmycolumn

Displaying 1 result from an estimated 1 matches for "getmycolumn".

Did you mean: getcolumn
2008 Nov 25
2
basic information defining functions
Hi all, i am looking from some insights to define own R functions. so far i found most basics in documentations that are around on the web. except for one thing: I?d like to define some function, say: #assume my data matrix contains vectors like data$myColumn1,data $myColumn2 etc. getMyColumn <- function (columnid){ x<-data$MyColumn?columnid?[data$indexone=1 & data$index2=5] return(x) } Do I need to use assign or eval first ? I tried to use paste to combine something like: paste("data$MyColumn",columnid,sep="") which did not work. I am happy to get...