Hi, 
I am searching for the equivalent of the function Index from SAS. 

In SAS: index("abcd", "bcd") will return 2 because bcd is located in the 2nd 
cell of the abcd string. 
The equivalent in R should do this:
> myIndex <- foo("abcd", "bcd") #return 2. 
What is the function that I am looking for?

I want to use the return value in substr, like I do in SAS.

thanks, y. baranan.
                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to