If you run this code, you will see that you end up with a deeply nested structure. I do not know why it is so big in your case but it would certainly be hard to work with.
total.male <- list()
total.male <- list(total.male, 1)
total.male <- list(total.male, 2)
total.male <- list(total.male, 3)
str(total.male)
I suggest you use functions from dplyr to do this calculation rather than a for loop. Here is an example with toy data.
set.seed(1)
suiciderate <- data.frame(sex = sample(c("F", "M"), 10, replace = TRUE),
Year = sample(1:2, 10, replace = TRUE))
suiciderate
#> sex Year
#> 1 F 1
#> 2 M 1
#> 3 F 1
#> 4 F 1
#> 5 M 1
#> 6 F 2
#> 7 F 2
#> 8 F 2
#> 9 M 2
#> 10 M 1
library(dplyr)
Stats <- suiciderate %>% group_by(Year) %>% summarize(Males = sum(sex == "M"))
Stats
#> # A tibble: 2 x 2
#> Year Males
#> <int> <int>
#> 1 1 3
#> 2 2 1
Created on 2020-05-06 by the reprex package (v0.3.0)