I have the following spreadsheets:
BIRDS.GENERO SP1 SP2 XLOCAL
Thamnomanes caesius glaucus 0°32'S52°12'W
Thamnomanes ardesiacus obidensis 0°10'S51°50'W
Thamnomanes caesius glaucus 00°53'44"N52°00'08"W
Thamnomanes ardesiacus obidensis 00°53'44"N52°00'08"W
Thamnomanes ardesiacus obidensis 01°40'N51°23'W
Thamnomanes ardesiacus obidensis 01°40'N51°23'W
Thamnomanes caesius hoffmannsi 03°58'14,82"S49°52'56,37"W
Thamnomanes caesius hoffmannsi 03°58'14,82"S49°52'56,37"W
Thamnomanes caesius hoffmannsi 03°31'46,9"S51°44'05,2"W
Thamnomanes caesius hoffmannsi 03°31'46,9"S51°44'05,2"W
I would like to split the XLOCAL column into Latitude and Longitude. So:
BIRDS.GENERO SP1 SP2 XLOCAL Lat Long
Thamnomanes caesius glaucus 0°32'S52°12'W 0°32'S 52°12'W
Thamnomanes ardesiacus obidensis 0°10'S51°50'W 0°10'S 51°50'W
Thamnomanes caesius glaucus 00°53'44"N52°00'08"W 00°53'44"N 52°00'08"W
Thamnomanes ardesiacus obidensis 00°53'44"N52°00'08"W 00°53'44"N 52°00'08"W
Thamnomanes ardesiacus obidensis 01°40'N51°23'W 01°40'N 51°23'W
Thamnomanes ardesiacus obidensis 01°40'N51°23'W 01°40'N 51°23'W
Thamnomanes caesius hoffmannsi 03°58'14,82"S49°52'56,37"W 03°58'14,82"S 49°52'56,37"W
Thamnomanes caesius hoffmannsi 03°58'14,82"S49°52'56,37"W 03°58'14,82"S 49°52'56,37"W
Thamnomanes caesius hoffmannsi 03°31'46,9"S51°44'05,2"W 03°31'46,9"S 51°44'05,2"W
Thamnomanes caesius hoffmannsi 03°31'46,9"S51°44'05,2"W 03°31'46,9"S 51°44'05,2"W
Searching the forum I found something like this:
dados$lat<- str_sub(dados$XLOCAL, end = 6)
head(x)
dados$long<- str_sub(dados$XLOCAL, start = 7)
As you can see there is a large variation in the size of the information. So the above argument does not work.
Thank you in advance.