Hi everyone,

I am trying to apply the following lines of coding (they are from the R
Graphics Cookbook, Chapter 3: Bar Graphs):

ggplot(data, aes(x=year_bis,y=area)) + geom_bar(stat="identity")

I do have a data.frame as follow:

  id year start_day loc    area
1  1 2010       155  20  3.4388
2  1 2010       169  18 11.6576
3  1 2010       183  17 15.5893
4  1 2010        71  41 22.0356
5  1 2010       127  42 27.2602
6  1 2010        99  37 52.2779


> str(data)'data.frame':        221 obs. of  5 variables:
 $ id       : int  1 1 1 1 1 1 1 1 1 1 ...
 $ year     : int  2010 2010 2010 2010 2010 2010 2008 2010 2009 2010 ...
 $ start_day: int  155 169 183 71 127 99 337 1 337 113 ...
 $ loc      : int  20 18 17 41 42 37 10 36 41 40 ...
 $ area     : num  3.44 11.66 15.59 22.04 27.26 ...


I called both packages "gcookbook" and "ggplot2" (among others). That's a
rather easy line of coding, but for some reasons I do have the following
warning message:

Error in as.environment(x) :

incorrect

objet for 'as.environment'


Do you have any clue why?
Thanks a lot.

Greetings.
-- 
Dylann Kersusan
Master Biodiversity and Conservation
Zoology dept. Stockholm University
--
Grimsö Wildlife Research Center
Ecology dept. SLU
Riddarhyttan-Sweden

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Reply via email to