[R-sig-Geo] where to store locally generated package data

Jonathan Callahan jonathan at mazamascience.com
Sun Jan 18 03:22:12 CET 2015


Our question is at the end after an explanation of what we are doing.

BACKGROUND:

We work a lot with spatial data, often extracting information from a
SpatialPolygonsDataFrame based on a set of site locations. A typical use
might be to find the country, state, timezone or HUC watershed ID
associated with a set of site locations.

We often need to convert shapefiles we find on the web into standardized
local .RData files. The procedure is fairly straightforward, though
different for each shapefile we need to download and convert.

We are just starting to create a package that encapsulates the download and
convert process along with other spatial functionality that we wish to
reuse.

Our plan is to release a package that contains both generic functionality
and single-purpose code for the creation of each individual
SpatialPolygonsDataFrame so that they can have standardized attributes.

The idea is that users would need to create the sometimes quite large
.RData files on their own system with commands like:

install.packages("MazamaSpatialUtils")

installSpatialData('WorldTimezones')
installSpatialData('PoliticalBoundaries',level=1)
installSpatialData('PoliticalBoundaries',country='US',level=2)
installSpatialData('Watersheds',country='US',level=12)

QUESTION:

Where should we store the locally generated .RData files so that they can
be found by the package functions?

Do we use an environment variable?

Is there any standard for this sort of approach to locally generated
package data?


Thanks for any suggestions.

Jonathan Callahan

-- 
Jonathan Callahan, PhD
Mazama Science
206-708-5028
mazamascience.com

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list