Skip to content
Prev 207115 / 398503 Next

Help with subset

Tena koe Jerry

I'm not sure exactly what you wish to do, but it would seem you could
create a character vector (myVars) containing all your merge field names
and then use a for() loop.  Something like:

for (myV in myVars)
{
  x116 <- subset(napt, Analysis_Soil %in% myV)
  if (nrow(x116) > 8)
  {
    # steps for your analysis
  }
}

HTH ......

Peter Alspach