structure(list(area_code = c(2, 2, 2, 2, 2, 2), area = c("Afghanistan", "Afghanistan", "Afghanistan", "Afghanistan", "Afghanistan", "Afghanistan"), item_code = c(2511, 2805, 2513, 2513, 2514, 2514), item = c("Wheat and products", "Rice (Milled Equivalent)", "Barley and products", "Barley and products", "Maize and products", "Maize and products"), element_code = c(0, 0, 1, 0, 1, 0), element = c("Food", "Food", "Feed", "Food", "Feed", "Food"), Y1961 = c(0, 183, 76, 237, 210, 403), Y2013 = c(0, 422, 360, 89, 200, 76)), row.names = c(NA,-6L),class = c("tbl_df", "tbl", "data.frame"))
если мой фрейм данных выглядит так, я хочу, чтобы R удалил все строки, в которых сумма Y1961 и Y2013 равна 0. В этом примере код удалит всю первую строку.