Dear R forum

I have a vector as 

dat = c("ABC 1", "ABC 2", "ABC 3", "DEF 10", "DEF 20")

> dat
[1] "ABC 1"  "ABC 2"  "ABC 3"  "DEF 10" "DEF 20"

I need to split the names into two parts say

   p1      p2
 ABC    1
 ABC    2
 ABC    3
 DEF     10
 DEF     20

Kindly guide

Katherine

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to