powered by
Addition, subtraction etc. of arrays
a1 %a+% a2a1 %a-% a2a1 %a*% a2a1 %a/% a2a1 %a/0% a2tab1 %a_% margtab1 %a==% tab2tab1 %a^% extratab1 %aperm% permtab1 %aalign% tab2tab1 %aslice% slicetab1 %aslice*% slicetab1 %amarg% marg
a1 %a-% a2
a1 %a*% a2
a1 %a/% a2
a1 %a/0% a2
tab1 %a_% marg
tab1 %a==% tab2
tab1 %a^% extra
tab1 %aperm% perm
tab1 %aalign% tab2
tab1 %aslice% slice
tab1 %aslice*% slice
tab1 %amarg% marg
Multidimensional arrays with named dimnames (we call them 'named arrays').
A vector of indices or dimnames or a right hand sided formula giving the desired marginal.
List defining the extra dimensions.
A vector of indices or dimnames or a right hand sided formula giving the desired permutiation.
A list of the form name=value.
Arrays (with named dimnames)
Søren Højsgaard, sorenh@math.aau.dk
hec <- HairEyeColor a1 <- tabMarg(hec, c("Hair", "Eye")) a2 <- tabMarg(hec, c("Hair", "Sex")) a3 <- tabMarg(hec, c("Eye", "Sex")) ## Binary operations a1 %a+% a2 a1 %a-% a2 a1 %a*% a2 a1 %a/% a2
Run the code above in your browser using DataLab