Hello,

 

I am new to R.  I often collect data at multiple sites and need to
create separate graphs (such as scatterplots or histograms) of specific
variables for each site.  I have tried to do this by splitting the data
frame and then using lapply, but it seems that the graphing commands
cannot be called as functions.  Here is a sample of my data, called
"seeddist2":

 

   site    DaysSinceRelease   distance_cm

10  GVM       1           17.8

11  GVM       1           17.8

12  GVM       1           14.0

13  GVM       1           14.0

14  GVM       1           14.9

15  GVM       1           25.4

16  WRR       1           25.4

17  WRR       1           35.0

18  WRR       1           45.0

19  WRR       1           55.0

20  WRR       1           60.0

 

Here is what I tried to get separate histograms of distance_cm by site:

splitlist<- split(seeddist2, site)

lapply(splitlist, hist(distance_cm, breaks=10))

 

I then get an error message saying that "match.fun" didn't find the
function.  Is there another way to produce multiple graphs at once?

 

Thank you,

 

Danielle B. Johnston, Habitat Researcher

Colorado Division of Wildlife

 


	[[alternative HTML version deleted]]


