Re: [R] Feed rle() output to hist()

2013-03-26 Thread Sarah Goslee
Do you want a histogram of the length distribution, or a barplot of the actual lengths? Either way, myrle$lengths will get it, if myrle is the output of rle(). ?rle tells you that: β€˜rle()’ returns an object of class β€˜"rle"’ which is a list with components: lengths: an integer vecto

Re: [R] Feed rle() output to hist()

2013-03-26 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Newbie1234 > Sent: Tuesday, March 26, 2013 2:03 PM > To: r-help@r-project.org > Subject: [R] Feed rle() output to hist() > > I want to make a histogram

[R] Feed rle() output to hist()

2013-03-26 Thread Newbie1234
I want to make a histogram from the lengths vector which is part of the output of rle. But I don't know how to access that vector so that I use it as an argument of hist(). What argument must I use so that I use the lengths vector as an input to hist()? Example output is: Run Length Encoding