[R] Count the number of unique days

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Mon Feb 24 22:18:50 CET 2014


Certainly it is possible. One way might involve using the "unique" function based on location and date before attaching the data to your SPDF.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On February 24, 2014 4:17:47 AM PST, bogdan_antonescu <bogdan.antonescu at manchester.ac.uk> wrote:
>Hi All, 
>
>I am working on a script to that is producing a lightning density map
>(numer
>of lightning flashes per area) based on a data set containing:
>date(year/month/day), time(hh/mm/ss), latitude, and longitude for each
>lightning flash. The attaches script is producing this map using a
>hexagonal
>grid. I am wondering if it is also possible to count the number of
>unique
>days in each grid cell, in order to produce a map with the number of
>day
>with lightning. 
>
>script:
>https://dl.dropboxusercontent.com/u/51871539/lightning_density.r
>data sample:
>https://dl.dropboxusercontent.com/u/51871539/lightning_test.csv
>
>Thank you very much for your help.
>
>Cheers,
>Bogdan
>
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Count-the-number-of-unique-days-tp4685740.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list