getFail = function(df, moduleName, threshold){
failList = df[df$moduleName<threshold,1:5]
return(row.names(failList))
}
getFail(class2020,moduleName="Module1",60)
This output returns nothing. I think the problem is that the function isnt picking up moduleName as "Module1"and it is trying to find the column called moduleName.
Is there anyway to access dataframe through a variable.
E.g. moduleName could be "Module2" "Module3" etc.