[R] does column exist?

Omar Lakkis uofiowa at gmail.com
Thu May 19 19:42:21 CEST 2005


How do I test if a data.frame has a column named X?
exists(o) checks if the object exists or not, I want to test if a
data.frame object (df) has a column names(X), something like:
exists(df$X)




More information about the R-help mailing list