Category "grouping"

Group list of objects into smallest possible number of sublists without exceeding maximum sum

I'm trying to write a method that groups objects into the minimum amount of sublists without mixing types (int field on object) or the sum of their values excee

Group data in a multidimensional array based on two columns

I have an indexed array of associative arrays like this: [ ['brand' => 'ABC', 'model' => 'xyz', 'size' => 13], ['brand' => 'QWE', 'model' =&

How to convert array of objects into custom grouped array

I am trying to convert the data object to custom format This is my data which i want to convert [ { Name: 15, GroupID: 1, Id: 1 }, { Name: 16, GroupID: 1,

Pandas: How to add a grouping variable based upon another column?

I have a dataframe with some id's and some dates. I want to be able to group the id's by their change in date to create a generalized "grouping_variable". In r

Grouping/Clustering Rectangles

I have a list of shapes (list of points) e.g. rectangles which I want to group/cluster together. This is what I have: And this is what I want to achieve. How

How to count groups string input with same character

this code is about Too Many Tabs code. URLs are considered equal if the domains are exactly the same, e.g. google.com and google.co.id are different Example inp

How can I group an array of objects by key?

Does anyone know of a way (lodash if possible too) to group an array of objects by an object key then create a new array of objects based on the grouping? For e

How to group array or column based data by a specific item's/column's value while summing-up the values of another?

We are building an integration in a SAAS product which exports data from a table and writes it to a CSV file. Tool allows JavaScript (Which i am not very famili

How to identify groups of interindividual revisitation?

I have an output data frame from the "recurse" package calculating the revisitation rate of several individuals based on GPS points. In the data frame I have 18

Group rows by column and sum another column within groups [duplicate]

I have an array looking like: array(480) { [0]=> array(2) { ["tag_id"]=> string(4) "6291" ["az"]=> int(5) } [

Chunk and transpose a flat array into rows with a specific number of columns

An array of values are provided in the order they should appear in columns. For example, the second value in the array should be displayed on a webpage beneath

Calculate percentage within a subgroup in R

I am new to R and I am struggling with calculating the percentage of certain observations in a data frame. My data frame is coming from an excel table with many

Split array into 4-element chunks then implode into strings

$array = [1, 2, 3, 4, 5, 6, 7, 8, 9]; I want output like ['1, 2, 3, 4', '5, 6, 7, 8', '9'];

JS group by month of date values (objects) in an array

My array is like this: myArray = [ {date: "2017-01-01", num: "2"} {date: "2017-01-02", num: "3"} {date: "2017-02-04", num: "6"} {date: "2017-02-05", nu

javascript | Object grouping

I have an object. It looks like below: [ { "name":"Display", "group":"Technical detals", "id":"60", "value":"4" }, { "name":"Manufact