Skip to content
Prev 366770 / 398502 Next

Extracting first number after * in a character vector

Elegant I don't know, but I think the appended does the trick.

-- Mike
+  "     2 X[0,JOHNSON] *              0             0             1 ",
+  "     3 X[0,WILLIAMS]              *              1             0 1 ",
+  "     4 X[0,JONES]   *              0             0             1 ",
+  .... [TRUNCATED]
[1] 0 0 1 0 0 0 0 0 0

        
On Mon, Jan 23, 2017 at 1:27 PM, Jim Lemon <drjimlemon at gmail.com> wrote: