19,263 reputation
14286
bio website
location
age
visits member for 2 years, 10 months
seen 2 mins ago

Frequently Asked Questions

WReach? Is that connected to WRI somehow?

The "WR" in my name has nothing to do with the company that develops Mathematica. It is just a coincidence.

Why do you start all your global variable names with $?

I use dollar signs for ad hoc global variables because I have been bitten too many times by accidentally assigning an own-value to a symbol that I happen to use, for example, in a symbolic equation. So I am in the habit of writing $x instead of x. I stick to that convention even for longer symbols like $initialUrl. Just like the regular symbol convention, Mathematica's predefined global symbols all start with a capital letter after the $. My ad hoc symbols always start with a lower case letter, so there is no conflict.

Why do you put semicolons and commas at the beginning of the line instead of at the end like a normal person?

I don't think of it that way. Rather, I switch from horizontal to vertical layout when a single expression is too long to fit on one line. This has the interesting side-effect of making the important delimiters stand out and line up. I first ran into this practice in the SQL community. SQL "programs" have the unpleasant property that they must be written as a single statement -- even if that statement is a hundred lines long (or more!). Sometimes Mathematica expressions share that property.


14m
comment TreePlot remove an arrow
For rotating the tree, see Can TreeForm be displayed “sideways”?.
3h
comment TreePlot remove an arrow
You have some extra braces in your replacement rules. Try this instead: {"p2a" | "p2b" | "p2c" -> "p2", "p3a" | "p3b" -> "p3"}
4h
comment TreePlot remove an arrow
In the desired plot mock-up, the upper "p2" node is terminal while the lower "p2" node has an edge to "Sp21". There is not enough information from the edge list alone to infer this output. In order to produce the output automatically, we will either need access to the required additional information, or we must adjust the desired output so that the edge between "p2" and "Sp21` is repeated in both locations.
4h
answered TreePlot remove an arrow
1d
answered Finding out all undocumented values for “Properties” in XxxData[] functions
2d
answered DateListLogLogPlot
2d
comment Camel hump string split
@alancalvitti See the new section concerning digit characters. I'm afraid that the Mathematica symbolic string pattern syntax does not yet fully support all of the functionality in PCRE regular expressions. I agree that they are so cryptic as to be "write only".
2d
revised Camel hump string split
added the section that includes digits as "hump" characters
Nov
20
comment Camel hump string split
Alas, the two dots are not quite enough for the abbreviations. Notice how "AASTriangle" is not split up. It doesn't detract from a good answer, though.
Nov
20
revised Camel hump string split
added a variant that keeps abbreviations together
Nov
20
answered Camel hump string split
Nov
19
comment Installing LinkSnooper on Windows
@FredSimons You say that you are on 32-bit Windows, but the LinkSnooper command you show references the 64-bit Java directory Windows-x86-64. Does it work if you change that to the 32-bit directory Windows instead?
Nov
19
answered What does it mean: “Assuming a matrix | Use a list of lists instead”?
Nov
17
comment String pattern defined by number of characters
I have added the section about recursive patterns.
Nov
17
revised String pattern defined by number of characters
added the section about recursive patterns
Nov
17
comment String pattern defined by number of characters
@Aisamu There is no direct equivalent in Mathematica's native string pattern syntax. It is probably possible to achieve a similar result using StringCases[s, $patt] where $patt is self-referential. The following pattern comes close, but it fails to preserve proper backtracking: $patt = "b" | "c" | ("a" ~~ (s___ /; StringMatchQ[s, $patt]) ~~ "d"). Even if it worked, it entails an evaluator callback from the PCRE engine for every potential match -- probably more trouble than it is worth.
Nov
17
revised String pattern defined by number of characters
added 59 characters in body
Nov
17
answered String pattern defined by number of characters
Nov
17
answered GroupBy and MaximalBy to create a new Dataset
Nov
17
answered How to get data from DB into dataset with keys