I have imported some data (which are originally in a .csv file) into R and have the following data frame, with only one variable--V1. There are tens-of-thousands of elements (rows) with the data composition shown below. V1 is a character variable, but it contains both words and numbers, which I would like to separate into three variables as shown at the bottom.
V1
"Tigers"
"Africa"
"23"
"North America"
"15"
"Asia"
"276"
"Elephants"
"Africa"
"233"
"North America"
"0"
"Asia"
"554"
This is what I would like the complete df to look like--three variables with the names Animal, Continent, Value. The value must be a numeric (or integer variable) and the other two variables may be either factors or characters.
Animal Continent Value
Tigers Africa 23
Tigers North America 15
Tigers Asia 276
Elephants Africa 233
Elephants North America 0
Elephants Asia 554
Thanks for any help. I do not want to do this manually.