I have spent couple of days in searching and trying multiple codes. I have used Merge (dataset, dataset1, method = "combat") I am first time using this forum and I am also new in R. I am working on gene expression datasets. Overall, I have 31 data sets, out of which 22 are training datasets and 9 are testing datasets.I want to merge all training datasets in one dataset and all testing datasets in one dataset.Also want to remove batch effect. I have used "merge" and "rbind" functions.I have used following code:
eset1 = read.csv("GSE2603.csv",header=T)
eset2 = read.csv("GSE5460.csv",header=T)
esets_Combat=merge(eset1,eset2,method='COMBAT')
write.csv(esets_Combat, file = "MyData.csv",row.names=TRUE)
Data set example:
GSM50036 GSM50037 GSM50038
Labels 0 0 0
1007_s_at 10.87493636 9.974109876 10.73323948
1053_at 6.230819524 6.72729023 6.349621731
117_at 7.008770037 7.317361071 6.849455739
121_at 8.504376889 8.293417668 8.495880914
Can anyone help me please.