[RkWard-devel] Wikipedia greek

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Wed Jan 31 15:08:33 UTC 2007


On Tuesday 30 January 2007 16:09, I. Soumpasis wrote:
> > rainbox (length (rk.temp.x))
>
> I believe you mean rainbow.

Indeed.

> I made some research on this. I used VADeaths 
> data. The results are shown on pdf. The length() does not seem to solve the
> problem but create another as you will see at the attached pdf. The problem
> seems to relates to the beside option because with the stacked plots there
> is no problem. Any other testing I have done, with any kind of variables
> seems to be right.

I think the difference between juxtaposed and stacked is simply that barplot 
will restart coloring at the first color for stacked plots, but not for 
juxtaposed ones.

> Can I have some other data were the problem seems to appear? Did anybody
> find any similar problem?

This one is an example of a problematic matrix:
x <- matrix (1:20, nrow=4, ncol=5)
Here the first value of x is 1, so only one color will ever be used (in either 
type of barplot).

> Is there any other suggestions of how to fix this?

I guess the proper solution would be to use either dim (x)[1] or is that is 
null (for vectors, and factors), use length (x). E.g.:

rainbow (if (is.null (dim(rk.temp.x)) length (rk.temp.x) else dim (rk.temp.x)
[1])

Not much time to experiment with it, however. You may have to try some 
variations in order to get everything right. Also, maybe take a look at 
barplot.default to figure out, how they determine the number of gray shades 
to use.

> P.S. Something irrelevant but it came to mind printing the output. Is there
> a way to skip printing the file:///home/user/.rkward/rk_out.html? Just a
> suggestion.

Could you rephrase? I did not understand, what you mean.

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20070131/73cf6037/attachment.sig>


More information about the Rkward-devel mailing list