Unable to generate table

Please ask your questions about R Markdown here.
Hi, I have been trying to generate 2 tables and I can only generate 1 of them as seen in the screenshot
image

Below are the codes that I have done to try generate the tables

stocks<-c("HD", "IP","RAD")%>%
   tq_get(get = "stock.prices", from = "2000-01-01")%>%
   select(symbol, date, adjusted)

head(stocks, n=6)%>%
   kable(caption = "First 6 Rows of Adjusted Stock Price from 1 January 2000.")
stocks=stocks%>%
  mutate(event=ifelse(date == "2008-09-15", "Lehman Bankruptcy",
  ifelse(date == "2020-03-01", "Pandemic", "BAU")))

head(stocks, n=6)%>%
   kable(caption = "First 6 Rows of Adjusted Stock Price from 1 January 2000.")
        
stocks%>%
  group_by(symbol) %>%
  summarise(`regress coefficient of date` =lm(adjusted ~ date)$
              coefficients[2],`residual of Bankruptcy` =
              abs(lm(adjusted ~ date)$residuals[event == "Leham Bankruptcy"]),
            `residual of Pandemic` =
              abs(lm(adjusted ~ date)$
              residuals[event == "Pandemic"]),
            `residual of BAU` = mean(abs(lm(adjusted ~ date)$
            residuals[event == "BAU"])), )

Any suggestions will be highly appreciated. Thanks!

Do you get two tables in you resulting document ? The one rendered ?

In the IDE notebook mode you get correctly two outputs

One for the kable

one for the table

what is exactly the issue ?
What is not showing ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.