Creating Paged table presentation

i have this need that I need to print tables across pages, would this take it and adjust the length across pages????

if i want to print the iris dataset how I would do it? i created a layout with title, intro box and content box and this is what i am trying to file at the beginning and then create another slide with title and content box

i used the below link for youtube using officer package and i have been generally successful except for

  • paginating tables i.e. spreading a long table across slides
  • somehow i am getting erros generating the pptx, before it was working fine

code-------

knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(officer)
library(quantmod)
# library("yfinance")
library(here)
library(flextable)
pres <- read_pptx(here("input/Rpresentation Template.pptx")) 
read_pptx(here("input/Rpresentation Template.pptx")) %>% 
  officer::layout_properties()
ticker <- "AAPL"

company_name <- yfinance::search_stock(ticker, keep_results = "top")

company_name <- "Apple"
summary <- yfinance::get_summaries(ticker)
# irisah <- flextable(iris) %>% autofit() %>% align( align="center", part="body") 

irisah <- flextable(iris) 
my_pres <- pres %>% 
  remove_slide(index = 1) %>%
  add_slide(layout= "StockPresentation", master="Office Theme") %>% 
  ph_with(value= company_name,
          location= ph_location_label(ph_label="Company Name")) %>% 
  ph_with(value= summary$longBusinessSummary, 
          location= ph_location_label(ph_label= "Company Description")) %>% 
   add_slide(layout= "IntroTable", master="Office Theme") %>% 
  ph_location(value= irisah,
          location= ph_location_label(ph_label="Table")) 


print(my_pres,("C:/Users/jic00/Desktop/210611- Business analytics/R/Output/{Sys.Date()} - Example {company_name} Summary.pptx"))

Shamelessly stealing @ GreyMerchant's answer see How to Make Beautiful Tables in R.

thank you for this. i will try to play with yaml lheader
however, the issue is when I need to print the material and i tthink all the packages offer html paginated compatibility, as it were

thank you for this
unfortuantely, this didn't work. However, I realised that I really need to be using xaringan, perhaps, as it does have easier layout for a generalised layout and changing reports

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.