my data set look like this
name attribute value
Tom age 20
Tom height 80
Tom weight 100
Jack age 22
Jack height 90
Jack weight 110
and I want to get a data set like this
Tom Jack
age 20 22
height 80 90
weight 100 110
should be pretty stragiht forward in SAS by transpose of two variables but it is not so in R , how can I do it ? I tried melt and transpose , but failed ....
df1 <- read.table(header = TRUE, stringsAsFactors = FALSE,
text = "name attribute value
Tom age 20
Tom height 80
Tom weight 100
Jack age 22
Jack height 90
Jack weight 110 ")