User Tools

Site Tools


howtos:workwithdata:import_quick_reference

This is an old revision of the document!


Examples of common import/create calls are provided below.

It is convenient to set up one or more import directory paths up front. For example:

string $importDir= $home + "/V1/primaryData"

csv file

This is an example of importing into a very simple mask variable, zoneMask[z], indexed by the a single pre-defined informant, zone. Here is the top of the source data file zonesMask.csv:

"zone","maskValue"
201,1
202,1
211,0
212,1
213,0
214,1
.
.
.

And here is the code

zoneMask[z] = import (; fileFormat=text, dataFormat=coordinate, \
	allCoord=on, delimiter=",", firstLine=2, \
	file=$importDir/zonesMask.csv)

Note:

  • the use of the firstLine=2 parameter to skip over the header row
  • no element name modification is required
howtos/workwithdata/import_quick_reference.1285778040.txt.gz · Last modified: 2010/09/29 16:34 by marcus.williams