[R] barplots
Jim Lemon
jim at bitwrit.com.au
Fri Oct 7 13:17:53 CEST 2011
On 10/07/2011 08:16 AM, Daniel Winkler wrote:
> Hello,
>
> I have somewhat of a weird data set and am attempting to create a barplot
> with it.
>
> I have 8 columns with different variables and their percentages. I have 1
> column with representations of 4 different treatments the variables undergo.
> I also have 1 column with year the data was recorded. I want to create a bar
> plot that plots all 8 variables grouped by treatment and year.
>
> I've tried creating subsets of each of the variables, no luck.
>
> My variables are arranged similar to this:
>
> Vascular.plants Solid.rock Gravel.and.cobbles
> 72.5 1.0 5
> 67.5 2.0 6
> 67.5 2.5 9
> 59.0 2.0 25
>
Hi Daniel,
If you want the grouping indicated by nested bars, see the barNest
function in the plotrix package.
Jim
More information about the R-help
mailing list