TCGA data sets joining multiple files I have downloaded harmonised the TCGA-HNSC dataset and extracted it. It has 546 samples in total, so what I see in it are FPKM normalised values. The first column remains the same with 60000 rows and 2 columns that is first column ENSEMBL ID and second column FPKM value.

So now the issue is I want to join all the 546 txt file into one where the first column remains the same and rest 546 column would be joined. I'm using this command:

paste -d " " *txt &gt; merged_file.txt


This is joining the all the data sets as ENSEMBL ID and FPKM value..

But I want 1st column as the ENSEMBLE ID and rest the sample FPKM any suggestion or help would be appreciated
In R:

flist = list.files("*.txt", path=".")
fl = lapply(flist, function(x) read.delim(x, header=F))
m = sapply(fl, function(x) x$V2)
row.names(m) = fl[[1]]$V1
colnames(m) = flist


That will give you an appropriately formatted matrix named m in R, which is probably where you want to continue processing things anyway.