Skip to content
Prev 206563 / 398503 Next

Help using Cast (Text) Version

On Jan 17, 2010, at 11:56 AM, Steve Sidney wrote:

            
Part of my confusion with your request (which remains unaddressed) is  
what you mean by "valid". The melt-cast operation has turned a bunch  
of NA's into 0's which are now indistinguishable from the original  
0's. So I don't see any way that operating on "b" could tell you the  
numbers you are asking for. If you were working on the original data,  
"res", you might have gotten the column-wise "valid" counts of column  
2 with something like:

  sum( !is.na(res[,2]) )
The cast object represents columns as a list of vectors. The i-th  
column is b[[i]] which could be further referenced as a vector. So the  
j-th row entry for the i-th column would be b[[i]][j].
David Winsemius, MD
Heritage Laboratories
West Hartford, CT