Entering edit mode
I'm having trouble with merging two datasets in R. The first part is not giving any problems, but in the second part I get an error that a uniquely valid column must be specified. It is actually an existing column, so I don't understand why it is not valid. Does anyone have a clue?
# Data merge and save for further processing
> df1<- as.data.frame(mynormGSE117852)
> df2<- as.data.frame(mynormSPN)
> merged_panNET_SPN<- merge(df1, df2, by.x="row.names", by.y="row.names")
> rownames(merged_panNET_SPN) <- merged_panNET_SPN[,1]
> merged_panNET_SPN[,1] <- NULL
> tmerged_panNET_SPN<-as.data.frame(t(merged_panNET_SPN))
> annoGEO<- merge(PD_panNET_SPN[,c(1,3)], tmerged_panNET_SPN, by.x="Sample_Name", by.y="row.names", sort = FALSE)
Error in fix.by(by.x, x) : 'by' must specify a uniquely valid column
What is
colnames(PD_panNET_SPN)
andrownames(tmerged_panNET_SPN
) ?tmerged_panNET_SPN = dataframe of two datasets which are merged above.
PD_panNET_SPN= a PD file of the two merged datasets
I was asking for the output of
colnames(PD_panNET_SPN)
andrownames(tmerged_panNET_SPN)
, we need to check your column and rownames, without this it is impossible to help youSorry, good one!
Guess I have to change colnames in PD file if I look at this right now?
You don't have any
Sample_Name
column inside yourPD_panNET_SPN
dataframe so it can't workYes there is one but not in the right place I see right now. Thanks, I know how to solve this now!