Skip to main content
10 events
when toggle format what by license comment
Oct 18, 2012 at 13:38 vote accept John
Jun 26, 2012 at 22:24 comment added Mike Honeychurch ImportData[[All, 1]] = StringTrim /@ ImportData[[All, 1]]; ImportData Maybe try that on both platform(?)
Jun 26, 2012 at 22:22 comment added Mike Honeychurch Note that you can use StringTrim for your whitespace cleaning: reference.wolfram.com/mathematica/ref/StringTrim.html
Jun 26, 2012 at 21:35 comment added Matariki I have tried the code on my Windows and my Mac and both give the same error message. Did you do something else before you executes the code on the mac?
Jun 26, 2012 at 21:33 answer added Sjoerd C. de Vries timeline score: 4
Jun 26, 2012 at 20:06 comment added John @IstvánZachar No problem. I did not load any custom packages and I run the code with fresh kernel on both systems. Problem remains.
Jun 26, 2012 at 20:03 comment added István Zachar Sorry, my mistake: it does match. Do you load any custom packages on your Mac? Did you make sure no previous garbage is left in the kernel? Better run on both machines with a fresh kernel.
Jun 26, 2012 at 19:57 comment added John @IstvánZachar: I replaced -> with :>. Works now on Windows. However, both -> and :> return the same result on my Mac. I don't understand why "the left hand side of the rule does not match anything in the list". In ImportData I have two lists which do match the pattern {a_, b_, cc_, d_, e_, f_, g_, h_, i_}.
Jun 26, 2012 at 19:48 comment added István Zachar The replacement is not used at all (as the left hand side of the rule does not match anything in the list), though WhitespaceCleaning@a is evaluated before any replacement is done, and its argument is not a string, so an error message is issued. Try RuleDelayed (:>) instead of simply using Rule (->).
Jun 26, 2012 at 19:35 history asked John CC BY-SA 3.0