Yaroslav Bulatov wrote:
> What is the recommended way of removing dependence on external files?
> Consider the following code
>
> data=Import["largedatafile.csv"];
> ListPlot[data]
>
> I'd like to have "data" saved in the notebook, so that when I open it,
> I can replot the data. My current solution is to copy and paste the
> data manually into a separate mathematica cell (ie, data={1,2,3...}),
> but that causes the front-end to freeze when largedatafile.csv is too
> large.
Put the data file into the same directory where the notebook is, and use
NotebookDirectory[] to find its location. This way the data file and
notebook can be moved around freely.
--
Szabolcs