Basically I'm tasked with making a simple phonebook in R.
I've made a large array which each entry following this pattern (FirstName LastName PhoneNumber, FirstName LastName PhoneNumber, etc.)
I need to do a simple print of someones info, like say first name was John it would return me all indexes starting with john.
I know I need an if statement but I do not know the proper syntax that I could just identify the beginning of the string. Can anyone help me?