0

I have a tibble dataframe. When I run df[[1]] I can get the first column as a list but I'm wondering how do I do the same for each row?

The data frame looks something like this:

# A tibble: 9 x 4
# Groups:   year [9]
      year    value1  value2  value3
      <dbl>   <int>   <int>   <int>
1     2001    NA      3       4
2     2002    8       3       4
3     2003    4       3       NA
4     2004    NA      NA      1
5     2005    9       NA      1
6     2006    1       NA      NA
7     2007    NA      5       NA
8     2008    9       5       NA
9     2009    NA      5       NA

0 Answers0