Displaying 1 result from an estimated 1 matches for "tp4606497p4606561".
2012 May 03
1
Runtime column name creation
Hello all,
I have a data frame with column names s1, s2, s3....s11
I have a function that gets two parameters, one is used as a subscript for
the column names and another is used as an index into the chosen column.
For example:
my_func <- function(subscr, index)
{
if (subscr == 1)
{
df$s1[index] <- some value
}
}
The problem is, I do not want to create a bunch of