Top "Subset" questions

A subset consists of those elements selected from a larger set of elements, by their position in the larger set or other features, such as their value.

Subsetting data in Python

I want to use the equivalent of the subset command in R for some Python code I am writing. Here …

python arrays r numpy subset
Subsetting a 2D numpy array

I have looked into documentations and also other questions here, but it seems I have not got the hang of …

python arrays numpy multidimensional-array subset
Find all possible subset combos in an array?

I need to get all possible subsets of an array with a minimum of 2 items and an unknown maximum. Anyone …

javascript arrays subset
Select multiple rows conditioning on ID in R

I tried to select the rows based on their ID. For example, in a data frame called test, ID 201 has 6 …

r subset
Subsetting R data frame results in mysterious NA rows

I've been encountering what I think is a bug. It's not a big deal, but I'm curious if anyone else …

r subset reshape na
Return data subset time frames within another timeframes?

There are very nifty ways of subsetting xts objects. For example, one can get all the data for all years, …

r time-series subset xts
best way to pick a random subset from a collection?

I have a set of objects in a Vector from which I'd like to select a random subset (e.g. 100 …

java algorithm collections random subset
Make a table showing the 10 largest values of a variable in R?

I want to make a simple table that showcases the largest 10 values for a given variable in my dataset, as …

r subset tabular r-table
Difference between subset and filter from dplyr

It seems to me that subset and filter (from dplyr) are having the same result. But my question is: is …

r filter subset
How to replace NA with mean by group / subset?

I have a dataframe with the lengths and widths of various arthropods from the guts of salamanders. Because some guts …

r subset na