Thiago,
> B_tot B_turn B_nest scale
> 0.98 0.96 0.02 Local
> 0.94 0.90 0.04 Habitat
>
>But I am not getting!!!
>
>Can someone help me?
Probably, but it would be much easier if you had described what you wanted
to do more clearly (e.g. what is on the x-axis? What is being stacked?)
and supplied your data in an easily usable form (the output from dput).
Anyway, I have assumed you didn't want the total to be part of the bars
and have made a data.frame, d, which looks like this with dput(d)
structure(list(b = structure(c(2L, 2L, 1L, 1L), .Label = c("B_nest",
"B_turn"), class = "factor"), scale = structure(c(2L, 1L, 2L,
1L), .Label = c("Habitat", "Local"), class = "factor"), value = c(0.96,
0.9, 0.02, 0.04)), .Names = c("b", "scale", "value"), row.names = c(NA,
-4L), class = "data.frame")
If you copy and paste that after "d <-" (without the quotes) on the
command line then you will have d.
Then, assuming scale (Local and Habitat) should be on the x-axis:
ggplot(d)+geom_bar(aes(x=scale,y=value,fill=b),stat="identity")
If that isn't what you want, you'll probably be able to get it from that.
Ron.