Hello Venerable List,

I am trying to loop (I think) an operation through a list of columns in a
dataframe to remove set of #DIV/0! values. I am trying to do this like so:

#Data.frame
test <- read.csv("http://dl.dropbox.com/u/1574243/sample_data.csv",
header=TRUE, sep=",")


#This removes all the rows with #DIV/0! values in the mean column.
only.mean <- test[!test$mean=="#DIV/0!",]

#This removes the majority of #DIV/0! values as there is a large block of
these values that extends over every column.
#However, it doesn't remove then all. Can any recommend a way where I can
cycle through all the columns and remove these values other than manually
like so:
mean.median <- only.mean[!only.mean$median=="#DIV/0!",] # and so on through
each column?

Can anyone recommend a better way of doing this?

Thanks in advance!

Sam

	[[alternative HTML version deleted]]

