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;
Hi!
Is it possible to automatically construct a table like this:
#treat B
# improvement
# + -
#treat A improvement + 1 3
# - 2 1
From these data:
pair <- c(1,1,2,2,3,3,4,4,5,5,6,6,
3 matches
Mail list logo