Josh

> I am wondering if anyone teaches the attach function to new students
> and if so, why?

I'm not sure whether my approach is the best or worst of both worlds.

I use attach() at the beginning with warnings of it being bad practice
and explain why. But also explain why on occasions, it can make life
easier. Such as your first few lessons in R.

Later we subset the data and then use the data$variable approach and I
remind them of my earlier explanation of attach() and why we are now
using a different approach.

Graham

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-teaching

Reply via email to