Though this may seem like a crazy way of doing things, I just wanted to add a "tidy" version of the task—not of adding a row, as such, but of getting the result (something to the effect of fruit total by month) using summarise().
library(tidyverse)
df <- tribble(
~Metric_name, ~May, ~Jun,
"apples", 11, 34,
"bananas", 632, 640,
"onions", 479, 503,
"oranges", 910, 939
)
gathered_df <- df %>%
gather(key = month, value = number, -Metric_name) # -Metric_name means everything but Metric_name
head(gathered_df)
#> # A tibble: 6 x 3
#> Metric_name month number
#> <chr> <chr> <dbl>
#> 1 apples May 11
#> 2 bananas May 632
#> 3 onions May 479
#> 4 oranges May 910
#> 5 apples Jun 34
#> 6 bananas Jun 640
gathered_df %>%
filter(Metric_name %in% c("apples", "bananas", "oranges")) %>%
group_by(month) %>%
summarise(total = sum(number))
#> # A tibble: 2 x 2
#> month total
#> <chr> <dbl>
#> 1 Jun 1613
#> 2 May 1553
Created on 2018-08-25 by the reprex package (v0.2.0.9000).
n.b. All of these answers are, in effect, doing the same thing—I'm just sticking to the basic tidyr and dplyr verbs, and, in keeping with tidy data principles, I avoid mixing summary information with individual observations in a data frame.
Edit: Technically, the format with separate months isn't "untidy," espeically not if the measures aren't actually the same (I'm assuming it's count or cost). The advantage of using the tidy format is really that it fits nicely in other tidyverse pipelines, e.g. with ggplot2
gathered_df %>%
filter(Metric_name %in% c("apples", "bananas", "oranges")) %>%
mutate(month = as_factor(month)) %>%
ggplot(aes(x = Metric_name, y = number, fill = month)) +
geom_bar(stat = "identity", position = position_dodge())
gathered_df %>%
filter(Metric_name %in% c("apples", "bananas", "oranges")) %>%
mutate(month = as_factor(month)) %>%
ggplot(aes(x = month, y = number, fill = Metric_name)) +
geom_bar(stat = "identity", position = position_dodge())