The string vector in R is such as:
C1 C2 C3 ... C10 C11 ... C16
But when I use this vector as x labels in plot I got
C1 C10 C11 ... C16 C2 C3 ... C9
How can I sort the string vector as the original series?
My code is:
tension <- read.table(file="targettension.txt")
t.frame <- data.frame(number = factor(paste(rep("C",16),(1:16),sep="")),tension = tension)
p <- ggplot(t.frame,aes(x=number,y=tension)) + geom_bar(stat="identity")
p + geom_text(aes(label=tension),just=1.5,colour="white",size=3,angle=90)