_p_VinskaTrta/_I_EnViRoS/_S_01_Integ/_A_01_Desc-R/
% -*- TeX:Rnw:UTF-8 -*-
% ----------------------------------------------------------------
% .R knitr file ************************************************
% ----------------------------------------------------------------
%%
<<echo=FALSE>>=
###############################################
## ##
## (c) Andrej Blejec (andrej.blejec@nib.si) ##
## ##
###############################################
@
<<echo=FALSE,results='hide'>>=
options(width=70)
@
\section{Analysis for variety}
<<>>=
var <- "C"
select <- pd$variety == var
@
<<>>=
design <- with(pd[select,], model.matrix(~ treat* day))
head(design)
@
<<>>=
fit <- lmFit(exprs[ ,select], design)
fit <- eBayes(fit)
head(fit1[1:6,])
@
<<>>=
my.interaction.plot <- function(F1,F2,y,...){
xlab <- deparse(substitute(F1))
y <- unlist(y)
ylim <- range(y)
interaction.plot(F1, F2, y,
col = 1:length(levels(F2)),
xlab = xlab,
ylim = ylim,
type = "b",
pch = rep(16, length(levels(F2))),
...
)
points(as.numeric(F1)+(as.numeric(F2)-1.5)/15,y, col=as.numeric(F2))
}
@
<<>>=
tt <- topTable(fit, coef=4)
@
<<>>=
varname <- rownames(tt)[1]
with(pd[select, ], my.interaction.plot(day,treat,exprs[varname,select]) )
@
<<>>=
@
Creators and SubmitterCreator
Submitter
Activity
Views: 860 Downloads: 34
Created: 7th Nov 2021 at 15:25
Last updated: 7th Nov 2021 at 15:25
AttributionsNone
Version History
Version 1 (earliest) Created 7th Nov 2021 at 15:25 by Andrej Blejec
No revision comments
Download
View content
https://orcid.org/0000-0001-7484-6031