Import your data

data("mtcars")
mtcars <- as_tibble(mtcars)

MyData <- read_csv("../00_data/MyData.csv")
## New names:
## Rows: 380 Columns: 23
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (6): Date, HomeTeam, AwayTeam, FTR, HTR, Referee dbl (17): ...1, FTHG, FTAG,
## HTHG, HTAG, HS, AS, HST, AST, HF, AF, HC, AC, HY...
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...1`

Repeat the same operation over different columns of a data frame

Case of numeric variables

mtcars %>% map_dbl(.x = ., .f = ~mean(x = .x))
##        mpg        cyl       disp         hp       drat         wt       qsec 
##  20.090625   6.187500 230.721875 146.687500   3.596563   3.217250  17.848750 
##         vs         am       gear       carb 
##   0.437500   0.406250   3.687500   2.812500
mtcars %>% map_dbl(.f = ~mean(x = .x))
##        mpg        cyl       disp         hp       drat         wt       qsec 
##  20.090625   6.187500 230.721875 146.687500   3.596563   3.217250  17.848750 
##         vs         am       gear       carb 
##   0.437500   0.406250   3.687500   2.812500
mtcars %>% map_dbl(mean)
##        mpg        cyl       disp         hp       drat         wt       qsec 
##  20.090625   6.187500 230.721875 146.687500   3.596563   3.217250  17.848750 
##         vs         am       gear       carb 
##   0.437500   0.406250   3.687500   2.812500
# Adding an Argument
mtcars %>% map_dbl(.x = ., .f = ~mean(x = .x, trim = 0.1))
##         mpg         cyl        disp          hp        drat          wt 
##  19.6961538   6.2307692 222.5230769 141.1923077   3.5792308   3.1526923 
##        qsec          vs          am        gear        carb 
##  17.8276923   0.4230769   0.3846154   3.6153846   2.6538462
mtcars %>% map_dbl(mean, trim = 0.1)
##         mpg         cyl        disp          hp        drat          wt 
##  19.6961538   6.2307692 222.5230769 141.1923077   3.5792308   3.1526923 
##        qsec          vs          am        gear        carb 
##  17.8276923   0.4230769   0.3846154   3.6153846   2.6538462
mtcars %>% select(.data = ., mpg)
## # A tibble: 32 × 1
##      mpg
##    <dbl>
##  1  21  
##  2  21  
##  3  22.8
##  4  21.4
##  5  18.7
##  6  18.1
##  7  14.3
##  8  24.4
##  9  22.8
## 10  19.2
## # ℹ 22 more rows
mtcars %>% select(mpg)
## # A tibble: 32 × 1
##      mpg
##    <dbl>
##  1  21  
##  2  21  
##  3  22.8
##  4  21.4
##  5  18.7
##  6  18.1
##  7  14.3
##  8  24.4
##  9  22.8
## 10  19.2
## # ℹ 22 more rows

Create your own function

# Double values in columns
double_by_factor <- function(x, factor) {x * factor}
10 %>% double_by_factor(factor = 2)
## [1] 20
mtcars %>% map_dfr(.x = ., .f = ~double_by_factor(x = .x, factor = 10))
## # A tibble: 32 × 11
##      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
##    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
##  1   210    60  1600  1100  39    26.2  165.     0    10    40    40
##  2   210    60  1600  1100  39    28.8  170.     0    10    40    40
##  3   228    40  1080   930  38.5  23.2  186.    10    10    40    10
##  4   214    60  2580  1100  30.8  32.2  194.    10     0    30    10
##  5   187    80  3600  1750  31.5  34.4  170.     0     0    30    20
##  6   181    60  2250  1050  27.6  34.6  202.    10     0    30    10
##  7   143    80  3600  2450  32.1  35.7  158.     0     0    30    40
##  8   244    40  1467   620  36.9  31.9  200     10     0    40    20
##  9   228    40  1408   950  39.2  31.5  229     10     0    40    20
## 10   192    60  1676  1230  39.2  34.4  183     10     0    40    40
## # ℹ 22 more rows
mtcars %>% map_dfr(double_by_factor, factor = 10)
## # A tibble: 32 × 11
##      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
##    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
##  1   210    60  1600  1100  39    26.2  165.     0    10    40    40
##  2   210    60  1600  1100  39    28.8  170.     0    10    40    40
##  3   228    40  1080   930  38.5  23.2  186.    10    10    40    10
##  4   214    60  2580  1100  30.8  32.2  194.    10     0    30    10
##  5   187    80  3600  1750  31.5  34.4  170.     0     0    30    20
##  6   181    60  2250  1050  27.6  34.6  202.    10     0    30    10
##  7   143    80  3600  2450  32.1  35.7  158.     0     0    30    40
##  8   244    40  1467   620  36.9  31.9  200     10     0    40    20
##  9   228    40  1408   950  39.2  31.5  229     10     0    40    20
## 10   192    60  1676  1230  39.2  34.4  183     10     0    40    40
## # ℹ 22 more rows

Repeat the same operation over different elements of a list

When you have a grouping variable (factor)

mtcars %>% lm(formula = mpg ~ wt, data = .)
## 
## Call:
## lm(formula = mpg ~ wt, data = .)
## 
## Coefficients:
## (Intercept)           wt  
##      37.285       -5.344
mtcars %>% distinct(cyl)
## # A tibble: 3 × 1
##     cyl
##   <dbl>
## 1     6
## 2     4
## 3     8
reg_coeff_tbl <- mtcars %>%
    
    # Split it into a list of data frames
    split(.$cyl) %>%
    
    # Repeat regression over each group
    map(~lm(formula = mpg ~ wt, data = .x)) %>%
    
    # Extract coefficients from regression results
    map(broom::tidy, conf.int = TRUE) %>%
    
    # Convert to tibble 
    bind_rows(.id = "cyl") %>%
    
    # Filter for wt coefficients
    filter(term == "wt")
reg_coeff_tbl %>%
    
    mutate(estimate = -estimate,
           conf.low = -conf.low,
           conf.high = -conf.high) %>%
    
    ggplot(aes(x = estimate, y = cyl)) +
    geom_point() +
    geom_errorbar(aes(xmin = conf.low, xmax = conf.high))

Create your own

Choose either one of the two cases above and apply it to your data

MyData %>% map_dbl(.x = ., .f = ~mean(x = .x))
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
##         ...1         Date     HomeTeam     AwayTeam         FTHG         FTAG 
## 190.50000000           NA           NA           NA   1.51315789   1.30526316 
##          FTR         HTHG         HTAG          HTR      Referee           HS 
##           NA   0.68157895   0.58947368           NA           NA  13.84736842 
##           AS          HST          AST           HF           AF           HC 
##  11.73684211   4.67894737   4.14210526  10.05526316  10.15789474   5.60263158 
##           AC           HY           AY           HR           AR 
##   4.82105263   1.65263158   1.74473684   0.05000000   0.06315789
MyData %>% map_dbl(.f = ~mean(x = .x))
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
## Warning in mean.default(x = .x): argument is not numeric or logical: returning
## NA
##         ...1         Date     HomeTeam     AwayTeam         FTHG         FTAG 
## 190.50000000           NA           NA           NA   1.51315789   1.30526316 
##          FTR         HTHG         HTAG          HTR      Referee           HS 
##           NA   0.68157895   0.58947368           NA           NA  13.84736842 
##           AS          HST          AST           HF           AF           HC 
##  11.73684211   4.67894737   4.14210526  10.05526316  10.15789474   5.60263158 
##           AC           HY           AY           HR           AR 
##   4.82105263   1.65263158   1.74473684   0.05000000   0.06315789
MyData %>% map_dbl(mean)
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
##         ...1         Date     HomeTeam     AwayTeam         FTHG         FTAG 
## 190.50000000           NA           NA           NA   1.51315789   1.30526316 
##          FTR         HTHG         HTAG          HTR      Referee           HS 
##           NA   0.68157895   0.58947368           NA           NA  13.84736842 
##           AS          HST          AST           HF           AF           HC 
##  11.73684211   4.67894737   4.14210526  10.05526316  10.15789474   5.60263158 
##           AC           HY           AY           HR           AR 
##   4.82105263   1.65263158   1.74473684   0.05000000   0.06315789
MyData %>% map_dbl(.x = ., .f = ~mean(x = .x, trim = 0.1))
## Warning in mean.default(x = .x, trim = 0.1): argument is not numeric or
## logical: returning NA
## Warning in mean.default(x = .x, trim = 0.1): argument is not numeric or
## logical: returning NA
## Warning in mean.default(x = .x, trim = 0.1): argument is not numeric or
## logical: returning NA
## Warning in mean.default(x = .x, trim = 0.1): argument is not numeric or
## logical: returning NA
## Warning in mean.default(x = .x, trim = 0.1): argument is not numeric or
## logical: returning NA
## Warning in mean.default(x = .x, trim = 0.1): argument is not numeric or
## logical: returning NA
##        ...1        Date    HomeTeam    AwayTeam        FTHG        FTAG 
## 190.5000000          NA          NA          NA   1.3684211   1.1447368 
##         FTR        HTHG        HTAG         HTR     Referee          HS 
##          NA   0.5526316   0.4473684          NA          NA  13.5493421 
##          AS         HST         AST          HF          AF          HC 
##  11.4342105   4.5394737   3.9046053  10.0164474   9.9638158   5.3750000 
##          AC          HY          AY          HR          AR 
##   4.6513158   1.5592105   1.6809211   0.0000000   0.0000000
MyData %>% map_dbl(mean, trim = 0.1)
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
## Warning in mean.default(.x[[i]], ...): argument is not numeric or logical:
## returning NA
##        ...1        Date    HomeTeam    AwayTeam        FTHG        FTAG 
## 190.5000000          NA          NA          NA   1.3684211   1.1447368 
##         FTR        HTHG        HTAG         HTR     Referee          HS 
##          NA   0.5526316   0.4473684          NA          NA  13.5493421 
##          AS         HST         AST          HF          AF          HC 
##  11.4342105   4.5394737   3.9046053  10.0164474   9.9638158   5.3750000 
##          AC          HY          AY          HR          AR 
##   4.6513158   1.5592105   1.6809211   0.0000000   0.0000000
MyData %>% select(.data = ., HS)
## # A tibble: 380 × 1
##       HS
##    <dbl>
##  1     8
##  2    16
##  3    14
##  4    13
##  5    14
##  6     9
##  7    13
##  8    14
##  9    17
## 10    13
## # ℹ 370 more rows
MyData %>% select(HS)
## # A tibble: 380 × 1
##       HS
##    <dbl>
##  1     8
##  2    16
##  3    14
##  4    13
##  5    14
##  6     9
##  7    13
##  8    14
##  9    17
## 10    13
## # ℹ 370 more rows
triple_by_factor <- function(x) {
    x * 3
}
10 %>% triple_by_factor()
## [1] 30
10 %>% triple_by_factor()
## [1] 30
MyData$FTHG %>% map(triple_by_factor)
## [[1]]
## [1] 6
## 
## [[2]]
## [1] 15
## 
## [[3]]
## [1] 3
## 
## [[4]]
## [1] 9
## 
## [[5]]
## [1] 9
## 
## [[6]]
## [1] 3
## 
## [[7]]
## [1] 9
## 
## [[8]]
## [1] 0
## 
## [[9]]
## [1] 6
## 
## [[10]]
## [1] 3
## 
## [[11]]
## [1] 6
## 
## [[12]]
## [1] 6
## 
## [[13]]
## [1] 0
## 
## [[14]]
## [1] 6
## 
## [[15]]
## [1] 15
## 
## [[16]]
## [1] 6
## 
## [[17]]
## [1] 3
## 
## [[18]]
## [1] 0
## 
## [[19]]
## [1] 0
## 
## [[20]]
## [1] 12
## 
## [[21]]
## [1] 15
## 
## [[22]]
## [1] 3
## 
## [[23]]
## [1] 0
## 
## [[24]]
## [1] 6
## 
## [[25]]
## [1] 3
## 
## [[26]]
## [1] 6
## 
## [[27]]
## [1] 3
## 
## [[28]]
## [1] 3
## 
## [[29]]
## [1] 3
## 
## [[30]]
## [1] 0
## 
## [[31]]
## [1] 9
## 
## [[32]]
## [1] 3
## 
## [[33]]
## [1] 0
## 
## [[34]]
## [1] 0
## 
## [[35]]
## [1] 12
## 
## [[36]]
## [1] 0
## 
## [[37]]
## [1] 0
## 
## [[38]]
## [1] 9
## 
## [[39]]
## [1] 0
## 
## [[40]]
## [1] 9
## 
## [[41]]
## [1] 3
## 
## [[42]]
## [1] 0
## 
## [[43]]
## [1] 0
## 
## [[44]]
## [1] 9
## 
## [[45]]
## [1] 0
## 
## [[46]]
## [1] 3
## 
## [[47]]
## [1] 9
## 
## [[48]]
## [1] 6
## 
## [[49]]
## [1] 3
## 
## [[50]]
## [1] 0
## 
## [[51]]
## [1] 0
## 
## [[52]]
## [1] 0
## 
## [[53]]
## [1] 6
## 
## [[54]]
## [1] 3
## 
## [[55]]
## [1] 6
## 
## [[56]]
## [1] 3
## 
## [[57]]
## [1] 9
## 
## [[58]]
## [1] 0
## 
## [[59]]
## [1] 9
## 
## [[60]]
## [1] 3
## 
## [[61]]
## [1] 3
## 
## [[62]]
## [1] 0
## 
## [[63]]
## [1] 9
## 
## [[64]]
## [1] 3
## 
## [[65]]
## [1] 6
## 
## [[66]]
## [1] 0
## 
## [[67]]
## [1] 6
## 
## [[68]]
## [1] 6
## 
## [[69]]
## [1] 3
## 
## [[70]]
## [1] 6
## 
## [[71]]
## [1] 0
## 
## [[72]]
## [1] 6
## 
## [[73]]
## [1] 12
## 
## [[74]]
## [1] 6
## 
## [[75]]
## [1] 0
## 
## [[76]]
## [1] 3
## 
## [[77]]
## [1] 0
## 
## [[78]]
## [1] 0
## 
## [[79]]
## [1] 6
## 
## [[80]]
## [1] 6
## 
## [[81]]
## [1] 9
## 
## [[82]]
## [1] 21
## 
## [[83]]
## [1] 3
## 
## [[84]]
## [1] 6
## 
## [[85]]
## [1] 3
## 
## [[86]]
## [1] 6
## 
## [[87]]
## [1] 3
## 
## [[88]]
## [1] 3
## 
## [[89]]
## [1] 3
## 
## [[90]]
## [1] 0
## 
## [[91]]
## [1] 0
## 
## [[92]]
## [1] 9
## 
## [[93]]
## [1] 6
## 
## [[94]]
## [1] 0
## 
## [[95]]
## [1] 0
## 
## [[96]]
## [1] 0
## 
## [[97]]
## [1] 0
## 
## [[98]]
## [1] 3
## 
## [[99]]
## [1] 3
## 
## [[100]]
## [1] 6
## 
## [[101]]
## [1] 3
## 
## [[102]]
## [1] 0
## 
## [[103]]
## [1] 3
## 
## [[104]]
## [1] 3
## 
## [[105]]
## [1] 6
## 
## [[106]]
## [1] 3
## 
## [[107]]
## [1] 3
## 
## [[108]]
## [1] 0
## 
## [[109]]
## [1] 3
## 
## [[110]]
## [1] 9
## 
## [[111]]
## [1] 0
## 
## [[112]]
## [1] 6
## 
## [[113]]
## [1] 9
## 
## [[114]]
## [1] 9
## 
## [[115]]
## [1] 6
## 
## [[116]]
## [1] 12
## 
## [[117]]
## [1] 3
## 
## [[118]]
## [1] 12
## 
## [[119]]
## [1] 9
## 
## [[120]]
## [1] 6
## 
## [[121]]
## [1] 6
## 
## [[122]]
## [1] 3
## 
## [[123]]
## [1] 12
## 
## [[124]]
## [1] 0
## 
## [[125]]
## [1] 0
## 
## [[126]]
## [1] 3
## 
## [[127]]
## [1] 12
## 
## [[128]]
## [1] 6
## 
## [[129]]
## [1] 3
## 
## [[130]]
## [1] 3
## 
## [[131]]
## [1] 3
## 
## [[132]]
## [1] 6
## 
## [[133]]
## [1] 3
## 
## [[134]]
## [1] 3
## 
## [[135]]
## [1] 0
## 
## [[136]]
## [1] 3
## 
## [[137]]
## [1] 3
## 
## [[138]]
## [1] 6
## 
## [[139]]
## [1] 9
## 
## [[140]]
## [1] 9
## 
## [[141]]
## [1] 3
## 
## [[142]]
## [1] 3
## 
## [[143]]
## [1] 0
## 
## [[144]]
## [1] 3
## 
## [[145]]
## [1] 6
## 
## [[146]]
## [1] 3
## 
## [[147]]
## [1] 9
## 
## [[148]]
## [1] 6
## 
## [[149]]
## [1] 6
## 
## [[150]]
## [1] 6
## 
## [[151]]
## [1] 3
## 
## [[152]]
## [1] 9
## 
## [[153]]
## [1] 9
## 
## [[154]]
## [1] 3
## 
## [[155]]
## [1] 0
## 
## [[156]]
## [1] 0
## 
## [[157]]
## [1] 12
## 
## [[158]]
## [1] 9
## 
## [[159]]
## [1] 0
## 
## [[160]]
## [1] 21
## 
## [[161]]
## [1] 0
## 
## [[162]]
## [1] 6
## 
## [[163]]
## [1] 6
## 
## [[164]]
## [1] 3
## 
## [[165]]
## [1] 9
## 
## [[166]]
## [1] 3
## 
## [[167]]
## [1] 0
## 
## [[168]]
## [1] 0
## 
## [[169]]
## [1] 6
## 
## [[170]]
## [1] 18
## 
## [[171]]
## [1] 0
## 
## [[172]]
## [1] 9
## 
## [[173]]
## [1] 6
## 
## [[174]]
## [1] 3
## 
## [[175]]
## [1] 6
## 
## [[176]]
## [1] 3
## 
## [[177]]
## [1] 9
## 
## [[178]]
## [1] 3
## 
## [[179]]
## [1] 3
## 
## [[180]]
## [1] 3
## 
## [[181]]
## [1] 3
## 
## [[182]]
## [1] 0
## 
## [[183]]
## [1] 9
## 
## [[184]]
## [1] 3
## 
## [[185]]
## [1] 0
## 
## [[186]]
## [1] 6
## 
## [[187]]
## [1] 6
## 
## [[188]]
## [1] 6
## 
## [[189]]
## [1] 9
## 
## [[190]]
## [1] 6
## 
## [[191]]
## [1] 0
## 
## [[192]]
## [1] 12
## 
## [[193]]
## [1] 6
## 
## [[194]]
## [1] 3
## 
## [[195]]
## [1] 3
## 
## [[196]]
## [1] 3
## 
## [[197]]
## [1] 6
## 
## [[198]]
## [1] 9
## 
## [[199]]
## [1] 6
## 
## [[200]]
## [1] 9
## 
## [[201]]
## [1] 6
## 
## [[202]]
## [1] 3
## 
## [[203]]
## [1] 6
## 
## [[204]]
## [1] 3
## 
## [[205]]
## [1] 0
## 
## [[206]]
## [1] 0
## 
## [[207]]
## [1] 3
## 
## [[208]]
## [1] 0
## 
## [[209]]
## [1] 3
## 
## [[210]]
## [1] 3
## 
## [[211]]
## [1] 0
## 
## [[212]]
## [1] 3
## 
## [[213]]
## [1] 3
## 
## [[214]]
## [1] 6
## 
## [[215]]
## [1] 0
## 
## [[216]]
## [1] 9
## 
## [[217]]
## [1] 3
## 
## [[218]]
## [1] 3
## 
## [[219]]
## [1] 6
## 
## [[220]]
## [1] 3
## 
## [[221]]
## [1] 6
## 
## [[222]]
## [1] 9
## 
## [[223]]
## [1] 6
## 
## [[224]]
## [1] 0
## 
## [[225]]
## [1] 3
## 
## [[226]]
## [1] 0
## 
## [[227]]
## [1] 9
## 
## [[228]]
## [1] 0
## 
## [[229]]
## [1] 0
## 
## [[230]]
## [1] 0
## 
## [[231]]
## [1] 3
## 
## [[232]]
## [1] 0
## 
## [[233]]
## [1] 6
## 
## [[234]]
## [1] 6
## 
## [[235]]
## [1] 3
## 
## [[236]]
## [1] 6
## 
## [[237]]
## [1] 0
## 
## [[238]]
## [1] 0
## 
## [[239]]
## [1] 0
## 
## [[240]]
## [1] 9
## 
## [[241]]
## [1] 6
## 
## [[242]]
## [1] 6
## 
## [[243]]
## [1] 6
## 
## [[244]]
## [1] 6
## 
## [[245]]
## [1] 3
## 
## [[246]]
## [1] 3
## 
## [[247]]
## [1] 18
## 
## [[248]]
## [1] 6
## 
## [[249]]
## [1] 6
## 
## [[250]]
## [1] 0
## 
## [[251]]
## [1] 0
## 
## [[252]]
## [1] 3
## 
## [[253]]
## [1] 0
## 
## [[254]]
## [1] 0
## 
## [[255]]
## [1] 0
## 
## [[256]]
## [1] 3
## 
## [[257]]
## [1] 0
## 
## [[258]]
## [1] 3
## 
## [[259]]
## [1] 12
## 
## [[260]]
## [1] 0
## 
## [[261]]
## [1] 6
## 
## [[262]]
## [1] 3
## 
## [[263]]
## [1] 0
## 
## [[264]]
## [1] 3
## 
## [[265]]
## [1] 6
## 
## [[266]]
## [1] 12
## 
## [[267]]
## [1] 15
## 
## [[268]]
## [1] 3
## 
## [[269]]
## [1] 3
## 
## [[270]]
## [1] 12
## 
## [[271]]
## [1] 0
## 
## [[272]]
## [1] 0
## 
## [[273]]
## [1] 6
## 
## [[274]]
## [1] 9
## 
## [[275]]
## [1] 3
## 
## [[276]]
## [1] 0
## 
## [[277]]
## [1] 6
## 
## [[278]]
## [1] 3
## 
## [[279]]
## [1] 6
## 
## [[280]]
## [1] 6
## 
## [[281]]
## [1] 0
## 
## [[282]]
## [1] 0
## 
## [[283]]
## [1] 0
## 
## [[284]]
## [1] 3
## 
## [[285]]
## [1] 6
## 
## [[286]]
## [1] 0
## 
## [[287]]
## [1] 6
## 
## [[288]]
## [1] 9
## 
## [[289]]
## [1] 6
## 
## [[290]]
## [1] 0
## 
## [[291]]
## [1] 0
## 
## [[292]]
## [1] 3
## 
## [[293]]
## [1] 3
## 
## [[294]]
## [1] 6
## 
## [[295]]
## [1] 3
## 
## [[296]]
## [1] 6
## 
## [[297]]
## [1] 15
## 
## [[298]]
## [1] 9
## 
## [[299]]
## [1] 9
## 
## [[300]]
## [1] 3
## 
## [[301]]
## [1] 3
## 
## [[302]]
## [1] 3
## 
## [[303]]
## [1] 0
## 
## [[304]]
## [1] 0
## 
## [[305]]
## [1] 0
## 
## [[306]]
## [1] 6
## 
## [[307]]
## [1] 6
## 
## [[308]]
## [1] 6
## 
## [[309]]
## [1] 6
## 
## [[310]]
## [1] 0
## 
## [[311]]
## [1] 9
## 
## [[312]]
## [1] 3
## 
## [[313]]
## [1] 3
## 
## [[314]]
## [1] 6
## 
## [[315]]
## [1] 3
## 
## [[316]]
## [1] 12
## 
## [[317]]
## [1] 6
## 
## [[318]]
## [1] 3
## 
## [[319]]
## [1] 3
## 
## [[320]]
## [1] 9
## 
## [[321]]
## [1] 6
## 
## [[322]]
## [1] 9
## 
## [[323]]
## [1] 0
## 
## [[324]]
## [1] 15
## 
## [[325]]
## [1] 0
## 
## [[326]]
## [1] 0
## 
## [[327]]
## [1] 6
## 
## [[328]]
## [1] 3
## 
## [[329]]
## [1] 3
## 
## [[330]]
## [1] 6
## 
## [[331]]
## [1] 0
## 
## [[332]]
## [1] 3
## 
## [[333]]
## [1] 0
## 
## [[334]]
## [1] 6
## 
## [[335]]
## [1] 3
## 
## [[336]]
## [1] 3
## 
## [[337]]
## [1] 0
## 
## [[338]]
## [1] 0
## 
## [[339]]
## [1] 3
## 
## [[340]]
## [1] 9
## 
## [[341]]
## [1] 3
## 
## [[342]]
## [1] 9
## 
## [[343]]
## [1] 9
## 
## [[344]]
## [1] 3
## 
## [[345]]
## [1] 6
## 
## [[346]]
## [1] 3
## 
## [[347]]
## [1] 12
## 
## [[348]]
## [1] 3
## 
## [[349]]
## [1] 6
## 
## [[350]]
## [1] 3
## 
## [[351]]
## [1] 0
## 
## [[352]]
## [1] 15
## 
## [[353]]
## [1] 3
## 
## [[354]]
## [1] 0
## 
## [[355]]
## [1] 9
## 
## [[356]]
## [1] 0
## 
## [[357]]
## [1] 3
## 
## [[358]]
## [1] 9
## 
## [[359]]
## [1] 3
## 
## [[360]]
## [1] 3
## 
## [[361]]
## [1] 3
## 
## [[362]]
## [1] 3
## 
## [[363]]
## [1] 6
## 
## [[364]]
## [1] 3
## 
## [[365]]
## [1] 6
## 
## [[366]]
## [1] 6
## 
## [[367]]
## [1] 3
## 
## [[368]]
## [1] 9
## 
## [[369]]
## [1] 3
## 
## [[370]]
## [1] 3
## 
## [[371]]
## [1] 15
## 
## [[372]]
## [1] 3
## 
## [[373]]
## [1] 9
## 
## [[374]]
## [1] 3
## 
## [[375]]
## [1] 6
## 
## [[376]]
## [1] 3
## 
## [[377]]
## [1] 12
## 
## [[378]]
## [1] 9
## 
## [[379]]
## [1] 9
## 
## [[380]]
## [1] 0