I have some genetic data I am trying to plot out on a per chromosome basis. The code is as follows:
plot(df[which(df[,1] == "chr7"),2],p_seq[which(df[,1] == "chr7")],type="l",lty=4,xlab="Locus",ylab="Median ZScore")
The dataframe (called df) has all the chromosomes in its first column labelled chr1, chr2 etc to chr22 and then chrX and chrY.
I would like to do the above plot for all the chr in column 1 and have them all on the same page. I would try and loop through chr and a number but X chrX and Y ruin this. Can anyone help?