Thank you Peter!
Great solutions! That's exactly what I was looking for.
MaurĂcio Cardeal
Em 08/04/2017 09:11, peter dalgaard escreveu:
> Here's one way:
>
>> ddw <- reshape(dd, direction="wide", idvar="pair", timevar="treatfac")
>> names(ddw)
> [1] "pair" "imprfac.A" "imprfac.B"
>> xtabs(
Here's one way:
> ddw <- reshape(dd, direction="wide", idvar="pair", timevar="treatfac")
> names(ddw)
[1] "pair" "imprfac.A" "imprfac.B"
> xtabs(~ imprfac.A + imprfac.B, ddw)
imprfac.B
imprfac.A + -
+ 1 3
- 2 1
(reshape() is a bit of a pain to wrap one's mind around;
2 matches
Mail list logo