Macaulay2 » Documentation
Packages » RandomMonomialIdeals :: writeSample
next | previous | forward | backward | up | index | toc

writeSample -- write sample data to a directory

Synopsis

Description

Write a random sample to a directory on disk. This function creates a directory in which the model and data are stored: one text file contains the information about the model used to generate the sample, and another text file contains the information about the sample itself.

i1 : writeSample(sample(ER(2,3,0.1),5), "testDirectory")
i2 : mySample = sample("testDirectory")

o2 = Sample{...4...}

o2 : Sample
i3 : peek mySample

o3 = Sample{ModelName => Erdos-Renyi                            }
            Parameters => (2, 3, .1)
            SampleSize => 5
                       2   2            2       2          2
            Data => {{x , x x }, {0}, {x x , x x }, {0}, {x x }}
                       1   1 2          1 2   1 2          1 2

See also

Ways to use writeSample :

For the programmer

The object writeSample is a method function.