So I tried extracting information from a dataset on GEO onto R using
idx <- which(colnames(pData(gset[[1]])) %in%
c('AgeAtDiagnosis:ch1', 'Death:ch1', 'Gender:ch1',
'Grading:ch1','LymphNodesInvaded:ch1','LymphNodesRemoved:ch1',
'OverallSurvival_months:ch1', 'pM:ch', 'pN:ch', 'pT:ch',
'RectumOrColon:ch1 ', 'Rezidiv:ch1',
'TumorFreeSurvival_months:ch1','TumorLocalization:ch1'))
metadata <- data.frame(pData(gset[[1]])[,idx],
row.names = rownames(pData(gset[[1]])))
I needed to extract 14 columns from my data set but R only extracted 8. I have re-tried this a number of times but get the same result. How do I obtain the remaining 4 columns? Also, instead of generating the actual values for 'Grading', I obtained the value 'character'. Please how do I solve this?
Please use
ADD COMMENT/ADD REPLY
when responding to existing comments to keep threads logically organized.SUBMIT ANSWER
is for new answers to the original question.As you are not helping me, I can no longer help you further at this moment. Each time that you encounter an error, you need to show the error and the commands that you are running, and also the contents of your data.
Sorry. Hope to explain myself better in future. So I was wondering why the discard function does not delete the NA values in the dataset:
This is the output I had (I selected the columns of concern):
Thanks
I do not know what you are trying to now do. Originally, you were trying to select columns from the pData (metadata)