Skip to content
Back to formatted view

Raw Message

Message-ID: <e6n0g0$42r$1@sea.gmane.org>
Date: 2006-06-13T18:34:40Z
From: Rob Steele
Subject: How to get values from dataframe's column conditional on other column
In-Reply-To: <222915329.20060613123536@list.ru>

There's more than one way to do it.  My favorite:

df <- data.frame(X = c(0.12, -0.24, 0.34),
                  Y = c(TRUE, TRUE, FALSE))

subset(df, Y, X)