use sprintf to join back into a single string specifying the fmt for adding the leading zeros, create the condition in ifelse to return that new format when there is - or else the old one.
Here we are going to discuss how to create error bar plots with help of ggplot. Visualization Graphs-ggside with ggplot » Following function will help us to summarize the dataset. data_summary <- function(data, varname, groupnames){ require(plyr) summary_func <- function(x, col){ c(...
ggplot(bit_2017,aes(x=Date,y=Close))+geom_line(color="blue")+geom_line(aes(y=mean(Close)),color="red",linetype="dotted")+geom_line(aes(y=quantile(Close,0.75)),color="black",linetype="dashed")+geom_line(aes(y=quantile(Close,0.25)),color="black",linetype="dashed")+geom_text(a...