colinsheppard / time

A NetLogo extension that brings date/time utilities and discrete event scheduling to NetLogo
12 stars 13 forks source link

How to write a time-series to file? #23

Closed SFRailsback closed 10 years ago

SFRailsback commented 11 years ago

I am struggling to write the snap log out to a file, in the absence of an export primitive. I tried using ts-get-range to make a list of entries, then file-print each entry. This would work if you transposed the list of lists it produces: if the top-level list contains the rows, and sublists are the columns. Then I could do this:

foreach time:ts-get-range snap-log start-time finish-time "ALL" file-print (word (time:get "second" first ?) "," item 1 ? "," item 2 ?)

colinsheppard commented 10 years ago

see time:ts-write:

6592d0e22605272257e56fd0b6400b1e24f94946