Skip to content
Prev 286469 / 398502 Next

loop for a large database

On Feb 26, 2012, at 7:13 AM, mari681 wrote:

            
In that instance "i" is a number and probably would not be matching  
something that was a character vector.
Since you never offered the requested information about your objects,  
this is guesswork. If MyVector is one of the 15 columns in MyTable  
then this will have good chance:

table(MyTable$MyVector)

If on the other hand they are separate and you want to ignore the  
elements not in MyVector, then assign the value of a table operation  
and then use match() to pick out the tabulated values

In the future, please al least offer the results of str(MyTable).