I would like to convert a column into row. Thus I use the function "reshape" to do it. More precisely, I have:
`n = c(2, 3, 5)
s = c("aa", "bb", "cc")
b = c(TRUE, FALSE, TRUE)
df = data.frame(n, s, b)`
The thing is that I have several values of "s" (always the same are repeated) for each "n".
I use:
reshape(df, idvar = "s", ,direction = "wide", varying = list("b"))
I am making a mistake somewhere but I cannot figure it out.