Hi Dave,

Thanks for your reply. I can't reproduce the last line of code your code.
The ifelse argument throws back an error saying it was not used.

A


On Fri, Feb 1, 2013 at 10:56 PM, David Winsemius <dwinsemius@comcast.net>wrote:

>
> On Feb 1, 2013, at 9:30 AM, Alfredo Tello wrote:
>
>  Hi Folks!
>>
>> I have a question regarding an issue on which I´ve read a few threads but
>> can´t resolve --> Labelling every other tick mark on the x-axis using
>> factors. Here´s an example:
>>
>>  Why not:
>
> db<-data.frame(date=as.factor(**c(1:50)),var=rnorm(50))
> barplot(db$var,names.arg=**ifelse( rep( c(TRUE,FALSE),
> length=length(levels(db$date) ) ),  levels(db$date),
> ""),las=2,cex.axis=0.8,cex=0.**8)
>
> barplot(db$var,names.arg=**ifelse( c(TRUE,FALSE),  levels(db$date),
> ""},las=2,cex.axis=0.8,cex=0.**8)
>
>
> -- David.
>
>> This labels all the tickmarks in my barplot, which is the default
>> behavior.
>> I would like to label every other tick mark in the barplot -->
>> 1,3,5,7 and so on.
>>
>> Thank you very much for your help!
>>
>>
>> All the best,
>>
>> A
>>
>> --
>> Alfredo Tello (http://alfredotello.com)
>> Sustainable Aquaculture Group
>> Institute of Aquaculture
>> University of Stirling
>> Scotland, UK.
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________**________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> David Winsemius, MD
> Alameda, CA, USA
>
>


-- 
Alfredo Tello (http://alfredotello.com)
Sustainable Aquaculture Group
Institute of Aquaculture
University of Stirling
Scotland, UK.

	[[alternative HTML version deleted]]

