On Tue, 31 Mar 2009, Stephen Weigand wrote:
I wonder if the 'sep' argument in reshape() is being ignored
unintentionally:
## From example(reshape)
df <- data.frame(id=rep(1:4,rep(2,4)),
visit=I(rep(c("Before","After"),4)),
x=rnorm(4), y=runif(4))
reshape(df, t
> "SW" == Stephen Weigand
> on Tue, 31 Mar 2009 18:33:05 -0500 writes:
SW> I wonder if the 'sep' argument in reshape() is being ignored
SW> unintentionally:
No. It is used much differently than you *assume* it's used.
As always, ?reshape contains the answer.
SW> #
I wonder if the 'sep' argument in reshape() is being ignored
unintentionally:
## From example(reshape)
df <- data.frame(id=rep(1:4,rep(2,4)),
visit=I(rep(c("Before","After"),4)),
x=rnorm(4), y=runif(4))
reshape(df, timevar="visit", idvar="id", direction="wide"