I need to split the column "leg1" into three columns (v1,v2,v3). The problem is that the amount of blank spaces is different by rows.
> head(data[,2:3])
name leg1
513 1 0.00000 0.00000 0.00000
514 2 -0.00000 -0.00000 -0.00000
515 3 0.00000 0.00000 0.00000
516 4 -0.03467 -0.03848 -0.02331
517 5 -0.00000 -0.00000 -0.00000
518 6 -0.00000 -0.00000 -0.00000
I tried to use gsub or substr, but I couldn`t do it.
Could anyone help me, please?
Thanks in advance!!