Skip to content

Commit 6714233

Browse files
committed
hotfix ANOVA interactions
ANOVA interaction term now included in outputs
1 parent 4622d2f commit 6714233

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: structToolbox
22
Type: Package
33
Title: Data processing & analysis tools for Metabolomics and other omics
4-
Version: 1.19.0
4+
Version: 1.19.1
55
Authors@R: c(
66
person(
77
c("Gavin","Rhys"),

R/anova_class.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,23 @@ setMethod(f="model_apply",
144144
return(A)
145145
})
146146

147+
out_cols=terms(M$formula)
148+
out_cols=attributes(out_cols)$term.labels
149+
147150
f_statistic=sapply(output,function(x){
148151
x$`F value`
149152
})
150153
f_statistic=as.data.frame(t(f_statistic))
151154
colnames(f_statistic)=rownames(output[[1]])
152-
f_statistic=f_statistic[,colnames(y),drop=FALSE]
155+
f_statistic=f_statistic[,out_cols,drop=FALSE]
153156

154157

155158
p_value=sapply(output,function(x){
156159
x$`Pr(>F)`
157160
})
158161
p_value=as.data.frame(t(p_value))
159162
colnames(p_value)=rownames(output[[1]])
160-
p_value=p_value[,colnames(y),drop=FALSE]
163+
p_value=p_value[,out_cols,drop=FALSE]
161164

162165
# fdr correct the p.values
163166
for (k in 1:ncol(p_value)) {

0 commit comments

Comments
 (0)