search for: residue_num

Displaying 1 result from an estimated 1 matches for "residue_num".

2013 Nov 01
1
Package(s) for making waffle plot-like figures?
...t;60", "61", "62", "63", "64", "65")) Inspired by a statexchange post, I am using these scripts to make the plots : library(ggplot2) col4=c('#E66101','#FDB863','#B2ABD2','#5E3C99') dflist=list() for (i in 1:37){ residue_num=length(which(df$position==i)) dflist[[i]]=df[df$position==i,2:3] waffle=expand.grid(y=1:residue_num,x=seq_len(ceiling(sum(dflist[[i]]$ratio)/residue_num))) residuevec=rep(dflist[[i]]$residue,dflist[[i]]$ratio) waffle$residue=c(as.vector(residuevec),rep(NA,nrow(waffle)-length(residuevec))) png(paste...