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

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


7h
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).
18h
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.
18h
revised Get the last line from each of a large number of files, transform them, and write all results to a single new file
added the note about using a negative stream position
1d
answered What is the natural way of using Dataset to get a FittedModel?
1d
revised How to insert zero counts uniformly with Dataset Counts query
add the example query for working from the raw data
1d
revised How to insert zero counts uniformly with Dataset Counts query
added the single-pass version of the replacement query
1d
answered How to insert zero counts uniformly with Dataset Counts query
2d
answered Changing Values in an Association using Map
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.
2d
revised How to get a list of all expressions in a notebook matching a certain pattern?
moved the caution about `ToExpression` from a comment to the main body
2d
answered How to get a list of all expressions in a notebook matching a certain pattern?
Jul
27
answered Dataset with no members
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
27
answered Error changing Dataset using Part
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
26
revised AssociationMap to query Dataset across levels?
all-new response using `Query`
Jul
26
awarded  Enlightened