Provided the format is always the same, something like this in base R?
df <- as.data.frame(matrix(unlist(df[, 2]), ncol = 3, byrow = T));
df;
# V1 V2 V3
#1 5 4 1
#2 2 3 2
#3 1 5 6
Explanation: unlist(df[, 2])
turns the entries in df[, 2]
into a vector, then reformat into a matrix
with ncol = 3
columns, and finally cast into data.frame
.
Sample data
df <- read.table(text =
"name.a 5
name.a 4
name.a 1
name.b 2
name.b 3
name.b 2
name.c 1
name.c 5
name.c 6")