 
 
 
 
 
 
Re: Best way to save data in notebooks
- To: mathgroup at smc.vnet.net
- Subject: [mg81893] Re: Best way to save data in notebooks
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Sat, 6 Oct 2007 04:34:42 -0400 (EDT)
- References: <fe4ua5$uo$1@smc.vnet.net>
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

