search for: col_5

Displaying 1 result from an estimated 1 matches for "col_5".

Did you mean: col5
2024 Apr 18
1
Tidyverse/dplyr solution for filling values of a tibble/dataframe from a column with a nested list.
...y, each list contains a set of doubles, with the first indicating a specific index (based on the 0 beginning python? index), and a certain value (e.g. 0.5). What I would like to do is generate set of columns based on the rang of unique indexes of each nested list. e.g.: col_1, col_2, col_3, col_4, col_5? Which I have done with the following: tibble[paste0("col_", 1:5)] <- 0 ?And then replace each 0 with the value (second number in the nested list), based on the index (first number in each nested list), for each row of the tibble. I wrote a function to split each nested list: nes...