Skip to content
Prev 284833 / 398502 Next

get the first character element from a list

On Feb 9, 2012, at 5:01 PM, Changbin Du wrote:

            
Perhaps something like:

  mapply ( "[", fields1, sapply(fields1, function(x)  
{ which.min( is.na( is.numeric(fields1))) }

There are certainly other  grep()-ish ways of approaching this.