13,843 reputation
13272
bio website
location
age
visits member for 2 years, 6 months
seen 6 hours ago

The "WR" in my name has nothing to do with the company that develops Mathematica.


11h
comment How to insert zero counts uniformly with Dataset Counts query
The difference between the /* behaviour between raw2 vs raw is strange and possibly a bug. In the meantime, try the supposedly equivalent expression raw2[Values /* KeyUnion, Counts][All, All, # /. _Missing -> 0 &]. If you wish to pursue the /* difference, I suggest a new question (which I presently cannot answer).
21h
comment Get the last line from each of a large number of files, transform them, and write all results to a single new file
@librik Thanks, that never occurred to me. I've added a note to that effect to my response.
2d
comment How to get a list of all expressions in a notebook matching a certain pattern?
@VladimirReshetnikov The $ prefix is purely stylistic. I use it so that global variable names stand out. I've been burnt too many times when I forget that x is bound to something, so I use $x instead. Mathematica uses the same convention for built-in globals, except those variables start with a capital letter after the $.
2d
comment How to get a list of all expressions in a notebook matching a certain pattern?
@Mr.Wizard Thanks for the comments. (1) Done. (2) Agreed, I just have the habit of using the long form. (3) It is not common, but I have seen it. It is similar to the Missing idiom. My choice was arbitrary and I was attempting to convey the notion of failure. The wrapper is strictly speaking not necessary -- the only requirement is that the head is different from Hold so that failures can be distinguished. Cell would be good enough. I leave it to the taste of the user.
Jul
27
comment Error changing Dataset using Part
Examples such as these are sure to increase the fun factor for the WRI employees working to compile the Query language into SQL ;)
Jul
26
comment Converting datasets to nested lists
+1 You could reduce the SP[...][...] expression to SP[GroupBy[Key["SNO"]], KeyDrop["SNO"] /* Values].
Jul
26
comment Converting datasets to nested lists
@Murta +1 you could use: List @@@ Normal @ Normal @ SP[GroupBy[Key["SNO"] -> ({#PNO, #QTY} &)]] to eliminate the "SNO" key.
Jul
26
comment AssociationMap to query Dataset across levels?
Okay, I think I finally see what you are after -- fingers crossed :). Please see my all-new response.
Jul
25
comment AssociationMap to query Dataset across levels?
Please see the new section in my response, "starting from titanicClass".
Jul
24
comment Mathematica 10 : Where is the Mathematica Book?
This is a duplicate of Where (have) the “Function Navigator” and “Virtual Book” gone?.
Jul
21
comment Report: IgnoringInactive: a bug?
On a related note, MatchQ[1, IgnoringInactive[0]] and MatchQ["a", IgnoringInactive["b"]] both return True instead of False (reported to WRI).
Jun
27
comment Can TreeForm be displayed “sideways”?
@alancalvitti Thanks for the pointer. The docs say that the functionality has been moved to the core system, but I see no sign of it in the WolframCloud. I'll try to remember to check V10 when it comes out and update my response accordingly.
Jun
25
comment Error message: Coordinate index 0 is out of range for the enclosing GraphicsComplex
The data has changed, but the principle is the same. poly contains zero-based indices (0-95) but they must be one-based (1-96). The simplest corrective action is something like Graphics[GraphicsComplex[coord, Polygon[poly + 1]]]. However, I find it suspicious that poly contains degenerate polygons with coincident corners (e.g. {0, 0, 0} or {1, 0, 1}).
May
10
comment Checkbox behaving weird when variables are local
I have sent a bug report to WRI.
Apr
15
comment RLink Java(TM) platform has stop working
Milos: FYI, if you address a comment to someone other than the poster of a response, you should address them using "@" syntax. For example, your previous comment was directed to Leonid, so you should include @LeonidShifrin in the comment text. He will receive a notification now because of this comment.
Apr
14
comment Can TreeForm be displayed “sideways”?
@belisarius Thanks for the pointer... I've updated my response.
Apr
13
comment Creating centered inline cell in text cell
Oops, I somehow missed the comments to this effect under the question. I'm afraid I am not aware of a good resource for this. Judging from the source that ships with Mathematica, it would seem that WRI frequently writes box language directly to obtain finicky formatting -- bypassing not only the UI but also functions like Grid, etc.
Apr
13
comment Understanding Transpose
Transpose[$m, {3, 2, 1}] === Flatten[$m, {{3}, {2}, {1}}], so you might find this discussion of Flatten useful.
Apr
13
comment Programming paradigm change
@Mr.Wizard I do indeed love your new method. I rest my case comparing writing Mathematica to writing poetry.
Apr
13
comment Programming paradigm change
@rasher Naaahhh, wait for the movie. We are hoping to get Steven Seagal to play Java, and Christopher Lloyd for Mathematica. I'm not too sure about the love triangle added to the shooting script involving Julia (Amanda Seyfried), but the climactic battle royale ought to make up for it... if we can secure the production funding for the CGI.