Here is my toy dataframe.How can I get the combination of a minimum number of variables that uniquely identify the observations in the dataframe i.e which variables together can make the primary key?

## What does < stand for in data.table joins with on=

Joining the data tables:via returns the expected result. However, I would expect the line:to returnbecause the keyword on:

## creating new variable that takes into account prior information from the earlier records

I have data as follows and I want to create new variable that takes into account the preceding information in the prior period. For example,

## identify consecutively overlapping segments in R

I need to aggregate overlapping segments into a single segment ranging all connected segments. Note that a simple foverlaps cannot detect connections between non overlapping but connected segments, see the example for clarification. If it would rain on my segments in my plot I am looking for the stretches of...

## performing frequency table by group with calculation count of value in R

Suppose this is my datasetI need calculate frequency for two groupsand for variable var1, calculate count of 1 value and 2 value. For each group. So the desired output

## Join datatables using column names stored in variables

I have 2 data.tables:The result I expect is the following: joining label from dt2 to dt1 by the fact that value1 in dt1 is between valueMin and valueMax in dt2 and dt2$name matches to value1). Here is a solution I have (gives correct result):

## Homogenize use of single and double digit numbers in string

I have a very large data.table in which (a large number of) items are defined by strings including text and numbers.

## Create a new column based on column that does not yet exist

I have the below data set:I want to create a new column df3 with first value equal to 100 and then lag(df3, 1) * (1 + df2). So the final output will be:

## Incremental sequences with interruptions

I have a dataset with repeating sequences of TRUE that I would like to label based on some conditions - by id, and by the sequence's incremental value. A FALSE breaks the sequence of TRUEs and the first FALSE that breaks any given sequence of TRUE should be included in...

## How to do operations on list columns in an R data.table to output another list column?

I still have a difficult time thinking about how one works with R data.table columns which are lists.