-
Notifications
You must be signed in to change notification settings - Fork 0
/
rant.txt
12 lines (6 loc) · 2.06 KB
/
rant.txt
1
2
3
4
5
6
7
8
9
10
11
12
https://stat.ethz.ch/pipermail/r-sig-geo/2015-September/023361.html
I would echo the data.table suggestion, (without any experience, just strong anecdotal evidence) - but also add the dplyr option. These fast and efficient "data frames" really change the metric for a lot of spatial data. It's amazing really what you can do off the cuff, fast.
Still, I wouldn't be recommending writing to one row of a data frame or matrix at a time. Is that really something we need? I'm not sure if dplyr or data.table help there.
FWIW, the benefit of tables is you can store 3 (and higher) dimensional grids without having to push them through restrictive rules, no need for for regularity or numeric-only attributes, and sparse grids are a breeze. The problem is you don't get the fast affine grid reference *unless you are careful* - following raster's lead with cell numbers you can get the best of both worlds with implicit cell numbers (for a full grid) or explicit (for sparse) and then lean on raster's cell-grid engine to "re-spatialize". (sp gives us n-D grids-as-data-frames, but only through a certain lens and not with any practical support). . I use nabor for kd-tree nn-search in 4D curvilinear ocean models for particle tracing, stored as a data frame - this works well since I don't need to know specifically which cell a point is in, but for other work (and visualization!) we need to have that grid topology.
This is ripe for improvement in R, I get a lot of benefit from going around the idioms in R-spatial - but only as much as is needed, leaning on the core tools as much as possibley. I think we need a lot more discussion and work here. Recently I've been storing polygons and lines purely in table-form, without recursive structures - it remains to be seen if this is worthwhile generally, but it makes converting to triangulated meshes and driving rgl, and warping images without resampling, and investigating resolution in existing data .. . etc. etc. . . . much more straightforward.
Almost weekly there are new packages on CRAN that do some form of mesh analysis or web mapping