#generating key to mimic your data variable "Freq1_Hit1"
hit<-rep(1:5,20)
freq<-rep(1:20,each=5)
freq_name=paste("freq",freq,sep="")
hit_name=paste("hit",hit,sep="")
key=paste(freq_name,"_",hit_name,sep="") #this is equal to your "variable"
###########################################################################
y<-unlist(strsplit(key,"_")) #split "variable into two string, convert into vector
ind1<-seq(1,length(y),by=2) #create odd index that would be use to extract "freq"
ind2<-seq(2,length(y),by=2) #creaet even index to extract "hit"
freq2<-y[ind1] #using indexing to create freq2 variable
hit2<-y[ind2] #useing indexing to create hit2 variable
your.newdata<-data.frame(your.data, freq2, hit2) #combine data
###########################################################################
ggplot(your.newdata, aes(x=...,y=...) +
geom_boxplot() + facet.grid(. ~ freq2)
您可以添加数据样本吗? – cmaher
请勿发布数据图片。请参阅[如何创建可重现的示例](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)。 “真正混乱”是什么意思?你想要的产出是什么? – MrFlick