On Oct 5, 2013, at 00:47 , Rolf Turner wrote: > On 10/05/13 05:15, John Kane wrote: >> X[,names(X)[4]] works fine for me. I had never thought of doing this. >> Neat idea. > > Perhaps I am being obtuse, but how would X[,names(X)[4]] differ from X[,4]?
By answering the question in the Subject field? (No-one intended to use it in production code. The mystery is that it - reportedly - threw an error for the original poster, but not for anyone else.) -pd -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.