delRep | R Documentation |
A function to delete specific number of replicates, the replicates causing largest standard deviation will be deleted.
delRep(data, group, m, method = "PCA", show.del = FALSE)
data |
A dataframe storing concentration of lipids between different samples. The column name should be the sample name and the row name should be the lipid type. The class of column name and row name should be "character". The class of values should be "numeric". The row names are recommended to be in a form like "PL(14:0/20:1)" or "LPL(16:1)". |
group |
Vector. The group information, recommended to be generated with groupXpert() |
m |
The number of replicates you want to delete. |
method |
The method to find the worst replicates, can be "PCA" or "Euclidean". Default value is "PCA". |
show.del |
Whether to show deleted columns. Default value is FALSE. |
A new dataframe deleting replicates which cause the largest SD.
WT_1=rnorm(n=5,mean=0.3,sd=0.1)
WT_2=rnorm(n=5,mean=0.3,sd=0.1)
WT_3=rnorm(n=5,mean=0.3,sd=0.1)
WT_4=rnorm(n=5,mean=0.3,sd=0.1)
KO_1=rnorm(n=5,mean=0.3,sd=0.1)
KO_2=rnorm(n=5,mean=0.3,sd=0.1)
KO_3=rnorm(n=5,mean=0.3,sd=0.1)
KO_4=rnorm(n=5,mean=0.3,sd=0.1)
data=data.frame(WT_1,WT_2,WT_3,WT_4,KO_1,KO_2,KO_3,KO_4)
rownames(data)=c("LPC(16:0)","PC(14:0/16:1)","PC(18:1/18:1)","PE(18:0/20:1)","PS(20:1/20:1)")
m=1
group=colnames(data)
names(group)=rep(c("WT","KO"),each=4)
delRep(data,group,m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.