Skip to content
Prev 305610 / 398506 Next

[newbie] aggregating table() results and simplifying code with loop

Thank you John,

you are giving me two precious tips (in addition, well explained!):
1. to use the package plyr (I didn't know it before, but it seems to
make the deal!)
2. a smart and promising way to use it

I can finally plot the partial results, to have a first glance and
compare to them

==========================================================

# once the sequences for a given crop have been assembled in a
dataframe (e.g., maizedata)
library(latticeExtra) # load the package for "improved" graphics
dotplot(mzcount$crop_pattern) # to plot the occurrence of all the
retrieved sequences

#once the target pattern have been subset (e.g., m51)
dotplot(m51$WS ~ m51$count) # to plot the occurrence of the target
pattern(s) per watershed

==========================================================

This help me retrieving all the possible patterns for the different
land covers. Hence, you made me able to improve the subset of
patterns.

Tomorrow morning I'm going to test the tips for all the land covers
for all the 5years time-periods. Even if still labour-intensive, the
solution you propose it's surely a steady improvement.
Now only the second question remains: is there a way "to clean" this
approach?... or probably not ?...

Thanks again for the help.
Cheers,
Dd

***********************************************************
Davide Rizzo
website :: http://sites.google.com/site/ridavide/
On Sun, Sep 16, 2012 at 8:24 PM, John Kane <jrkrideau at inbox.com> wrote: