Try subscripting, e.g. # L holds numbers; its names hold lookup keys L <- 1:26; names(L) <- letters L[c("d","f")] # look up numbers of d and f
or merge, e.g. merge(c("d","f"), L, by.x = 1, by.y = 0) Anne <anne.piotet <at> urbanet.ch> writes: : : Hello R helpers! : I looked but did not find a table-lookup R-utility. I could use a loop to do the job (old FORTRAN/C habits die : hard) but if I have a big table in which I have to search for the values corresponding to a vector, I end up : logically with a double loop. : Is there already such a utility? Otherwise, is there a way without loops? : : Thanks as always : Anne ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html