Skip to content
Back to formatted view

Raw Message

Message-ID: <3f87cc6d05051910421ad010a9@mail.gmail.com>
Date: 2005-05-19T17:42:21Z
From: Omar Lakkis
Subject: does column exist?

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)