I am new to \'R\' and \'Stackoverflow\' so forgive me for the incredibly basic question. I\'m trying to find the \'index\' of the first female in my dataset.
Code Snaps
If you want to know the rows#, this should give you the rows, with their numbers printed to the screen, and you will see the index for rows with it.
bike[bike$gender=="F",]
and if you only want the row numbers to set to a vector
rnam<-row.names(bike[bike$gender=="F",])
Probably the most direct method would be to use
match("F", bike[,"genders"]
which will return the index of the first match.