results<-list()
for(i in unique(g,g$`cancer type abbreviation`)){
z<-subset(g,g$`cancer type abbreviation`= i)
z<-z$sample
new.m<-m[m$sample % in % z,]
important.value <-mean(new.m$RNAss)
results[(i)] <-important.value
}
When I run this loop, I'm getting following error continuously. Plz help me to solve it.
> results<-list()
> for(i in unique(g,g$`cancer type abbreviation`)){
+ z<- subset(g,g$`cancer type abbreviation`= i)
Error: unexpected '=' in:
"for(i in unique(g,g$`cancer type abbreviation`)){
z<- subset(g,g$`cancer type abbreviation`="