# NOT RUN {
library(rgoogleslides)
rgoogleslides::authorize()
# Define the presentation slide id (Can be retrieved from the url of the slides)
slides_id <- "<slide-id>"
# Define the youtube video id (Can be retrieved from the url of the youtube video)
youtube_id <- "<youtube-id>"
page_element <- aligned_page_element_property("p", align = "full")
request <- add_create_video_request(id = youtube_id, page_element_property = page_element)
commit_to_slides(slide_id, request)
# }
Run the code above in your browser using DataLab