Displaying 1 result from an estimated 1 matches for "temporarytable".
2011 Jul 27
1
Referencing a column using a function argument
...all from more experienced users is
appreciated!
I'd like to write a function that uses a column name as an argument.
However, I run into problems when I try to reference this column within
the function.
For example,
findCutoff <- function(tableName, columnName) {
temporaryTable <- subset(tableName, select = c(V1, V4,
columnName))
x <- length(tableName$columnName [tableName$columnName >
6] )
...etc.
}
I know a couple of ways to reference a column:
1. tableName$columnName
2. tableName[["columnName&quo...