[R] How to use a function inside a regression formula

2011-09-30 Thread Jim Cheng
Hi, How do I use a function inside a regression formula? When I tried to use min() function inside a regression formula, I ran into errors. Here are the commands to reproduce the error: mydata <- read.csv(url("http://www.ats.ucla.edu/stat/r/dae/binary.csv";)) attach(mydata) names(mydata) m

[R] NDCG in R?

2011-06-10 Thread Jim Cheng
Dose R have a function to calculate NDCG? http://en.wikipedia.org/wiki/Discounted_cumulative_gain#Normalized_DCG Thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj