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?

## Split string every n characters new column

Suppose I have a data frame like this with a string vector, var2What is the most efficient way to split var2 every n characters into new columns until the end of each string,

## Use broom and tidyverse to run regressions on different dependent variables

I'm looking for a Tidyverse / broom solution that can solve this puzzle: Let's say I have different DVs and a specific set of IVS and I want to perform a regression that considers every DV and this specific set of IVs. I know I can use something like for...

## Fill numeric variable while preserving group

[EDITED to reflect a better example]Say I have a dataframe like this:How can I increment year by 1 while preserving x? I would like to fill in year so that the sequence is this: