My data is structured as:
df <- data.frame(Athlete = c('02 Paul Jones', '02 Paul Jones', '02 Paul Jones', '02 Paul Jones',
'02 Paul Jones', '02 Paul Jones', '02 Paul Jones', '02 Paul Jones',
'01 Joe Smith', '01 Joe Smith', '01 Joe Smith', '01 Joe Smith',
'01 Joe Smith', '01 Joe Smith', '01 Joe Smith', '01 Joe Smith'),
Period = c('P1', 'P1', 'P1', 'P1',
'P2', 'P2', 'P2', 'P2',
'P1', 'P1', 'P1', 'P1',
'P2', 'P2', 'P2', 'P2'))
# Make `Athlete` column a character
df$Athlete <- as.character(df$Athlete)
How do I extract the first and last names of each athlete whilst keeping the space between first and last name? I do not want the leading space including either. For example, "Paul Jones"
not " Paul Jones"