On Dec 24, 2013, at 9:02 PM, Kochikkaran Musammilu wrote:

> Hai,
> 
> I
> am new to „R‰ software. 
> 
> I have a doubt, while doing analysis,
> keeping the x axis value as year, in graphical representation (ie, in
> boxplot) the values comes as "X2005", and "X2006"
> and so on in x axis. How to keep "2005", "2006"
> as x axis value instead of "X2005" and "X2006".
> In gist, there comes a prefix "X" before the numeric value
> of X axis variables. How to solve this problem?
> 
> If any suggestions/guidance, please feel free to write 
> <musamm...@hotmail.com>.  Kindly give me the "R" command to get rid of above 
> problem!
> 

`boxplot` has a names argument. If you are passing a dataframe with a 'grp' 
variable to boxplot.formula, then try:
     boxplot( ... , names = sub("^X", "" dfrm$grp), ...)

See ?regex and ?sub

If this does not address your specific problem, then you would need to be .... 
more specific.

-- 
David Winsemius
Alameda, CA, USA

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to