[R] locate word in vector

kevinchang shukai at seas.upenn.edu
Sat Sep 15 01:51:36 CEST 2007


Hey All,


I am wondering if there is a built-in function allowing us to locate a
particular word in a character vector.

ex: vector a

a
[1] "superman"  "xamn"      "spiderman" "superman"  "superman"  "xman"     
[7] "spiderman"

Is there any built-in function that can show "superman" are the first,
fourth and fifith element in "a"? Please help me out. Thanks. 


-- 
View this message in context: http://www.nabble.com/locate-word-in-vector-tf4445881.html#a12685567
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list