This doesnt seem like its actually an R markdown question, rather a data transformation question.
You are asking about how to construct a single data.frame from different sources.
This might involve joins, but more likely constructing columns or rows programatically.
library(tidyverse)
(mean_of_iris_setosa_petal_length_df <- filter(iris,
Species=="setosa")%>%
summarise(mean_of_iris_setosa_petal_length =
mean(Petal.Length)))
(max_miles_per_gallon_mpg_audi_df <- filter(mpg,
manufacturer=="audi")%>%
summarise(max_miles_per_gallon_mpg_audi =
max(hwy)))
(my_table <- tibble(mean_of_iris_setosa_petal_length_df,
max_miles_per_gallon_mpg_audi_df))
# A tibble: 1 x 2
mean_of_iris_setosa_petal_length max_miles_per_gallon_mpg_audi
<dbl> <int>
1 1.46 31