Message-ID: <4E1480A6.10205@uea.ac.uk>
Date: 2011-07-06T15:35:02Z
From: Jim Maas
Subject: elegant way of removing NA's and selecting specific values from a data.frame
I have a data.frame "e" and would like to extract the 23rd column,
remove any NA's and then remove any values >= 30. I can do it in steps
such as this but have failed to figure out how to do it in a single line
.... any suggestions?
first <- e[,23]
second <- first[!is.na(first)]
third <- second[second<=30]
thanks a bunch
J
--
Dr. Jim Maas
University of East Anglia