A nice feature of the mathematica documentation is the copious use of ExampleData in illustrating functionality. I would like to provide some example data for a package I have written, but there is apparently no guidance in the docs or on the net on how to do this. Consequently, I have two related questions:
Is there a hook into the system's
ExampleDatafunction for providing your own example data? I'm thinking along the lines of theImportExport`RegisterImport[]function that provides seamless integration of a custom import converter to theImport[]command.If not, what is a good way to provide example data from a custom package? Ideally, the data would be available from the documentation browser when someone tries one of the examples.
I would prefer to package the data together with the package code, rather than store it on a remote server and access it with Import["http://myserver.com/exampledata.zip"].
myData[stuff], add aFormatrule and some selectors? – ruebenko Aug 16 '12 at 18:04Importit from there?Import[FileNameJoin[{NotebookDirectory[], "testfile.xls"}]]or so. What would anExampleDataversion do more than that? – Sjoerd C. de Vries Aug 16 '12 at 21:12ExampleData, one does not need to know the location of the data, as in jVincent's answer below. WithImport, you need to know the location of the data file... – JxB Aug 17 '12 at 1:52