Displaying 2 results from an estimated 2 matches for "rowfactor".
Did you mean:
refactor
2010 Jan 29
1
apply function with grouped columns
...sier.
An example of what I have been doing is below.
#Four observations of four variables
v1 <- c(1, 8, 5, 3)
v2 <- c(5, 5, 6, 5)
v3 <- c(3, 2, 9, 4)
v4 <- c(4, 1, 1, 1)
myData <- data.frame(v1=v1, v2=v2, v3=v3, v4=v4)
myData
#The observations have either property 1 or property 2
rowFactor <- data.frame(RowTraits=factor(c(1, 2, 1, 2)))
rowFactor
#The variables have a property that is either present or absent
colFactor <- data.frame(ColTraits=factor(c(1, 1, 0, 0)))
colFactor
#Getting the means for the columns by row groups is easy
MeanByRowTraits <- aggregate (myData, rowFa...
2012 Sep 08
1
How to insert vertical space between lines of tables created with the R package 'tables'?
...(vertical) space between every other line of the
table. I checked the manual and vignette of 'tables', but it only covers the
case when there is just one variable specified in the left-hand side of the
formula (so "to the left" of "~"). I tried to adapt the idea of using
RowFactor() ...
tabular(RowFactor(1:4, "", spacing=2, space=0.5) + d * beta ~ group * mean *
Heading() * value, data=df)
... but obtain ...
Error in `colnames<-`(`*tmp*`, value = "") :
length of 'dimnames' [2] not equal to array extent
Cheers,
Marius