Questions tagged [grouping]

The process of grouping entities into collections of associated elements.

Grouping is a form of hierarchical knowledge representation, similar to mind mapping, concept mapping and argument mapping, all of which need to observe at least some of the principles of grouping.

SQL Server - Indicates whether a specified column expression in a GROUP BY list is aggregated or not. Read more about this

Wiki Links

7381 questions
11
votes
4 answers

Split list of datetimes into days

I've got a sorted list of datetimes: (with day gaps) list_of_dts = [ datetime.datetime(2012,1,1,0,0,0), datetime.datetime(2012,1,1,1,0,0), datetime.datetime(2012,1,2,0,0,0), …
Alex L
  • 8,748
  • 5
  • 49
  • 75
11
votes
6 answers

Group array items based on variable javascript

I have an array that is created dynamic from an xml document looking something like this: myArray[0] = [1,The Melting Pot,A] myArray[1] = [5,Mama's MexicanKitchen,C] myArray[2] = [6,Wingdome,D] myArray[3] = [7,Piroshky Piroshky,D] myArray[4] =…
Tobias
  • 494
  • 3
  • 14
  • 30
11
votes
1 answer

data.table grouping column is length 1 in "J"

As I'm learning data.table, I found a situation I can't elegantly work around. Up front: the absurdity of the lm formula is obvious, I'm trying to determine if this nuance can be easily worked around with a keyword or special operator within the…
r2evans
  • 141,215
  • 6
  • 77
  • 149
11
votes
1 answer

Algorithm to find optimal groups

A device contains an array of locations, some of which contain values that we want to read periodically. Our list of locations that we want to read periodically also specifies how often we want to read them. It is permitted to read a value more…
Ian Goldby
  • 5,609
  • 1
  • 45
  • 81
11
votes
5 answers

How to make JasperReports groups start on new page only when needed?

I'm using JasperReports and iReport (output to PDF), and I have a problem with a certain report: Inside the report I have defined a group. On average, each "instance" of that group only contains a small number of detail rows, so I don't want each of…
Malki
  • 2,335
  • 8
  • 31
  • 61
11
votes
3 answers

R data.table: subgroup weighted percent of group

I have a data.table like: library(data.table) widgets <- data.table(serial_no=1:100, color=rep_len(c("red","green","blue","black"),length.out=100), …
C8H10N4O2
  • 18,312
  • 8
  • 98
  • 134
11
votes
3 answers

Basic - T-Test -> Grouping Factor Must have Exactly 2 Levels

I am relatively new to R. For my assignment I have to start by conducting a T-Test by looking at the effect of a politician's (Conservative or Labour) wealth on their real gross wealth and real net wealth. I have to attempt to estimate the effect of…
Chris Thwaites
  • 113
  • 1
  • 1
  • 6
11
votes
2 answers

R (data.table) group data by custom range (for example, -18, 18-25, ..., 65+)

I can't find a solution in R (using data.table) to group data by a custom range (for example, -18, 18-25, ..., 65+) not by a single value. What I'm using right now: DT[,list(M_Savings=mean(Savings), M_Term=mean(Term)), by=Age] [order (Age)] This…
Itanium
  • 73
  • 1
  • 3
  • 9
11
votes
7 answers

Ideal number of classes per namespace branch

What number of classes do you think is ideal per one namespace "branch"? At which point would one decide to break one namespace into multiple ones? Let's not discuss the logical grouping of classes (assume they are logically grouped properly), I am,…
petr k.
  • 8,040
  • 7
  • 41
  • 52
11
votes
4 answers

Linq: How to group by maximum number of items

CONTEXT I have a list of items (or arbitrary length). I'd like to group them in 'chunks' of a certain size Example: I have 12 customers [0,1,2,3,4,5,6,7,8,9,10,11] and want to group themin chunks of 5 which would give [0,1,2,3,4] [5,6,7,8,9]…
namenlos
  • 5,111
  • 10
  • 38
  • 38
10
votes
3 answers

Windows 7 taskbar icon grouping with multiple similar windows

When I have a number of similar windows opens, for example, multiple explorer windows, they are all grouped into the same icon on the taskbar. When I hover over this I get a thumbnail of the window, and a piece of truncated text which is supposed…
russ
  • 181
  • 1
  • 1
  • 10
10
votes
1 answer

what's the difference between grouping and facet in lucene 3.5

I found in lucene 3.5 contrib folder two plugins: one is grouping, the other is facet. In my option, both of them were used to split my documents into different categories. Why lucene has now two plugins for this?
mlzboy
  • 14,343
  • 23
  • 76
  • 97
10
votes
3 answers

What is the fastest way to map group names of numpy array to indices?

I'm working with 3D pointcloud of Lidar. The points are given by numpy array that looks like this: points = np.array([[61651921, 416326074, 39805], [61605255, 416360555, 41124], [61664810, 416313743, 39900], [61664837, 416313749, 39910], [61674456,…
mathfux
  • 5,759
  • 1
  • 14
  • 34
10
votes
4 answers

optimal algorithm grouping data in javascript

The following (simplified) json type of data defines a Contact: { id: number; name: string; phone: string; email: string } There is the following group of data: +---+----------+-------------+---------------------------+ |id | name |…
Han
  • 166
  • 7
10
votes
2 answers

Count data divided by year and by region in R

I have a very large (too big to open in Excel) biological dataset that looks something like this year <- c(1990, 1980, 1985, 1980, 1990, 1990, 1980, 1985, 1985,1990, 1980, 1985, 1980, 1990, 1990, 1980, 1985, 1985, …
colebrookson
  • 831
  • 7
  • 18