[R] List and Column Names in a Function?

From: <khobson_at_fd9ns01.okladot.state.ok.us>
Date: Sat 14 May 2005 - 01:24:29 EST

In this simple function, how can I pass strings for index and column names to the function? I've posted this type of question before and received no response.

Maybe this example will be easier to understand and troubleshoot.

ds <- function(myds, vec) {myds[[vec]]*2}

ds1 <- c(X=list(1:10), Y=list(11:20))


Kenneth Ray Hobson, P.E.
Oklahoma DOT - QA & IAS Manager
Oklahoma City, OK 73105-3204

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat May 14 01:32:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:45 EST