Linked Questions

4
votes
1answer
153 views

List manipulation - grouping sublists according to their first element

I have the following list: ...
7
votes
1answer
95 views

Conditional union of a nested list

With a nested list such as listA = {{{a,b,c},{1,0,0}}, {{a,b,c},{0,1,0}}, {{d,e,f},{1,1,0}}}; How can I create ...
2
votes
1answer
63 views

How to reshape a list in a predefined way? [duplicate]

Consider a list (list) as ...
5
votes
1answer
305 views

Sum some columns in list of associations grouped by other columns

I often need to sum values in a list of Associations according to some columns in that Association. I have a way of doing it, ...
4
votes
1answer
1k views

List of tuples: group by first element of tuple; sum up the second element per group [duplicate]

Imagine following list list = {{0, 3}, {1, 1}, {1, 2}, {2, 3}, {2, 4}} I would like to get the result ...
2
votes
1answer
152 views

Association Sum by key [duplicate]

I get results from FindInstance as a list of associations. {{a -> 1, b -> 2}, {a -> 3, b -> 4}} I would like to ...
1
vote
4answers
141 views

Adding Rule Solutions

A package I'm working on uses rule solutions (like the output of Solve) as inputs to functions. I'd like to be able to easily manipulate these rule solutions by ...
3
votes
1answer
169 views

How to modify multiple rules in a single list

How can I modify multiple rules simultaneously in a single list of rules? Right now I generate two lists, where both rules are replaced with the same value in each single list. But what I want is the ...
0
votes
1answer
348 views

Mapping AssociationThread over list with repeating keys [closed]

I have two lists. One with the same repeating four keys and the other with unique values. Both are the same length. I want to Associate the first list with the second list. So if that if the 5th ...
1
vote
2answers
206 views

Group matrix values by column [closed]

Original Question: I have a list {{a, 1}, {b, 3}, {c, 1}, {d, 2}, {e, 3}}. I want to be able to group the the first number in each pair that has the same second ...
2
votes
0answers
81 views

Matching list entries by two values, adding the third [duplicate]

I have data in form of: data={{1,1,3},{1,1,6},{2,1,7},{2,2,4},{2,1,1}}; I want to match the entries with the same first two elements and add the third element in ...
6
votes
4answers
404 views

Average dataset with many repetitions?

I have a dataset where each item is of the form: <|"p1" -> x1, "p2" -> x2, "r1" -> y1, "r2" -> y2|> The interpretation is this: ...
5
votes
3answers
195 views

Add up data values for matching entries [duplicate]

Is there a function that extends Tally in the following way (essentially need an answer to this guy's homework question): the a <...
1
vote
1answer
100 views

Problem averaging multiple series of data [duplicate]

Recently I'm having trouble figuring out a certain problem in Mathematica. I have a table of data in the following arrangement: {series no., x, y} Now, each series of data has exactly the same x ...
1
vote
2answers
443 views

Combining data sets by adding y values [duplicate]

Suppose I have the following list of data {{1,2},{1,5},{6,1},{1,3},{2,1},{2,2},{2,3},{5,4},{5,2}} This is similar to my actual data in that each x value has ...

15 30 50 per page