lee
Sent: Friday, September 26, 2008 3:10 PM
To: r-help@r-project.org
Subject: [R] data frame column name as a function argument
Hello,
I'd like to pass a column name as the argument for a function, but I'm
getting "NULL" as a return value. Any suggestions? Thanks.
> d <
Hello,
I'd like to pass a column name as the argument for a function, but I'm
getting "NULL" as a return value. Any suggestions? Thanks.
> d <- data.frame(cbind(x=1, y=1:10))
> d
x y
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 1 6
7 1 7
8 1 8
9 1 9
10 1 10
> testing <- function(var) {
2 matches
Mail list logo