I start with R and I cannot figure out how to do this:
I have a named vector with player names and its score:
x <-c(3, 4, 6, 2, 3, 5, 0, 1, 1, 2)
names(x) <- c("ALBERTO", "ANTONIO", "PEPE", "JUAN", "ANDRES", "PEDRO", "MARCOS", "MATEO", "JAVIER", "FRANCISCO")
I need to get ratings for players whose name begins with the letter "A".
Is it possible to set a condition on an element name?
Thank!
Nacho source
share