PancreasLungDesign
Individual sex age RNA.quality..max10. organ tissue
GTEX-1KXAM-0226-SM-EV7AP GTEX-1KXAM 1 60-69 7.2 Pancreas Pancreas
GTEX-18A67-1726-SM-7KFT9 GTEX-18A67 1 50-59 7.5 Pancreas Pancreas
GTEX-14BMU-0726-SM-73KXS GTEX-14BMU 2 20-29 7.2 Pancreas Pancreas
GTEX-13PVR-0726-SM-5S2PX GTEX-13PVR 2 60-69 7.3 Pancreas Pancreas
GTEX-1211K-1126-SM-5EGGB GTEX-1211K 2 60-69 7.3 Pancreas Pancreas
GTEX-11TT1-0326-SM-5LUAY GTEX-11TT1 1 20-29 7.7 Pancreas Pancreas
GTEX-1KXAM-0426-SM-DHXKG GTEX-1KXAM 1 60-69 9.1 Lung Lung
GTEX-18A67-1126-SM-7KFSB GTEX-18A67 1 50-59 8.5 Lung Lung
GTEX-14BMU-0526-SM-73KW4 GTEX-14BMU 2 20-29 9.2 Lung Lung
GTEX-1211K-0826-SM-5FQUP GTEX-1211K 2 60-69 8.2 Lung Lung
GTEX-11TT1-1626-SM-5EQL7 GTEX-11TT1 1 20-29 8.9 Lung Lung
GTEX-ZYFG-0226-SM-5GIDT GTEX-ZYFG 2 60-69 8.7 Lung Lung
Hello, I was trying to change the names of sex 1 and 2 of pancreas tissue, so i wanted to change the name of row 1,2,6 from 1 to P1 and the rows on 3,4,5 from 2 to P2, but when I try:
row.names((PancreasLungDesign)[1,2])="P1"
I get the error: attempt to set 'rownames' on an object with no dimensions How can i change the names for only those 6 genes? What am I doing wrong?
I am sorry but as you can see im new with r and coding generally, the question was kinda stupid, thank you for the help.
I dont know how to cancel it by the way
Everyone was new at some point. If your line of code was perfect except for using a coma where you need a colon, I would have pointed it out; it's a simple mistake that someone used to a different kind of syntax could make, and sometimes people can overlook their own stupid typos. But I don't think you understand what the rownames function even does, and how do you think the computer knows to change a value in the Sex column here you have nowhere indicated that that's the column you are interested in? You have to 1) think about what you want your code to do, 2) if it's not working break it down into substeps and check every substep to make sure they work.