14,988 reputation
13277
bio website
location
age
visits member for 2 years, 7 months
seen 13 mins ago

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


1d
comment Dataset: cannot reproduce a basic example. A bug?
A similar problem, if not exactly the same, is reported here.
1d
comment Dataset Mathematica 10.0
A similar problem, if not exactly the same, is reported here.
1d
comment Why is Query so much slower than Part?
I added an update to correct a wrong assertion about the scans in Dataset`WithOverrides.
2d
comment Functional-Style Partial Application and the Accumulator Pattern?
@Reb.Cabin While my proposed revised definitions of partial were correct, my explanation as to why the original generalized definition failed was in error. Please see my corrected and expanded explanation.
Aug
10
comment Dataset: get number of levels and elements
@Szabolcs I added a new variation incorporating your suggestion.
Aug
3
comment Problem with WordBoundary in string patterns
@eldo Marvel licenses aren't cheap. :)
Aug
3
comment Unexpected behavior when using SortBy as a dataset filter
@Rojo "Yes" on both points. Query always treats its parameters as operators, so it is not receiving special treatment when inside another query. I'll leave it in the quoted extract since that it how it appears in the documentation.
Aug
2
comment Dataset: cannot reproduce a basic example. A bug?
@PatoCriollo I followed those exact steps and they work for me. I even tried it with no init.m. Hopefully the next time the problem occurs for me it won't be in the middle of real work and I can take some time to diagnose.
Aug
2
comment Dataset: cannot reproduce a basic example. A bug?
@Mr.Wizard I was going to ask the same thing on chat, but I just now voted to re-open instead.
Aug
2
comment Dataset: cannot reproduce a basic example. A bug?
@PatoCriollo FYI, I couldn't find a way to make that expression fail on my machine.
Aug
1
comment Dataset: cannot reproduce a basic example. A bug?
I experience this problem intermittently, but have not yet been able to determine reproduction steps. At some point in my session, this error begins to appear in all typeset Datasets, even the examples from the help. In my case, a kernel restart usually corrects the condition. V10.0.0 / Win7 / 64-bit
Jul
30
comment What is the natural way of using Dataset to get a FittedModel?
@RunnyKine Indeed ;) Leftovers from one of the other 50 variations I tried, no doubt. Removed.
Jul
30
comment How to insert zero counts uniformly with Dataset Counts query
I posted a question about the possible bug.
Jul
29
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).
Jul
29
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.
Jul
27
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 $.
Jul
27
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.