# Tag Info

1

I did a few tests and arrived to the conclusion, that best is to produce headered data in C and then read it as a stream. First, generate some large rectangular data sets (10 000 x 100, this might take a few seconds). The first one with 10% NAN entries: dataNan = Table[If[RandomReal[] < .1, "-1.#IND00", RandomReal[]], {10000}, {100}]; ...

4

To regularly run terminal stuff from within Mathematica use CellEvaluationFunction as described by WReach on this site. Step 1 set up a cell style: Cell[StyleData["Terminal"], CellFrame->2, ShowGroupOpener->False, CellMargins->{{66, 4}, {10, 8}}, Evaluatable->True, StripStyleOnPaste->True, ...

6

Here's a straightforward way: Clear[copy, merge]; copy[file1_, out_OutputStream] := Module[{input}, input = Check[Import[file1, "Text"], Return[$Failed]]; BinaryWrite[out, input]; BinaryWrite[out, "\n"]; ]; merge[files_List, outFile_String] := Module[{out}, Check[out = OpenWrite[outFile, BinaryFormat -> True], Return[$Failed]]; ...

4

ReadList["test.dat", Table[Record, {3}], RecordSeparators -> {" ", "\n"}] /. "-1.#IND00" -> Indeterminate // ToExpression One can also use the RecordLists -> True option for irregular data. You can also use -1.#IND00 as RecordSeperators and they'll be skipped during the reading of the data. e.g. ReadList["test.dat", Record, RecordSeparators ...

1

On Mac OS X, version 10.9, Mathematica version 9.0.1 can distinguish between creation and modification dates. For a typical notebook: DateDifference[ FileDate[filename, "Creation"], FileDate[filename, "Modification"], "Minute"] returns {126.083, "Minute"} which I presume means that this file was worked on during a period of about two ...

0

Linux simply does not store creation date. (Its ultimately an ambiguous quantity). Presumably macs are the same, being linux based. (Thought way back when the original mac system did track creation date) http://stackoverflow.com/questions/14842195/how-to-get-file-creation-date-time-in-bash-debian

7

This is a consequence of the semantics of Thread, which does not hold its arguments. This issue has been discussed many times in various Mathematica - related resources. For the case at hand, and also generally, there are several ways to avoid this issue. The simplest solution would be to just avoid Thread here and use Map instead: Map[FileDate, ...

4

The following function finds a notebook (a .nb file) with a given maximum age (in days) in a given directory or its subdirectories: notebookSearch[dir_String, age_?NumericQ] := Select[ FileNames["*.nb", {dir}, Infinity], First[DateDifference[FileDate[#], DateList[], "Day"]] <= age & ]

6

There is a way to tell Mathematica to remember, in its File->Open list, long list of files you have opened and not the default of 8. The above is from options. Simply change the value from 8 to say 100, and now you will have all those files remembered. I used to have the same problem as you until I found this option.

5

Mathematica 9.0, WinXP Apparently both forms of Put[] (ie Put[] and >>) don't operate with the same criteria on the file name treatment. Please take a look at the syntax coloring in the following example: While the standard Put[] waits for an expression to be interpreted, the >> form waits for a String (with or without apostrophes). So, when ...

Top 50 recent answers are included