knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Note the various macros within the vignette
section of the metadata block above. These are required in order to instruct R how to build the vignette. Note that you should change the title
field and the \VignetteIndexEntry
to match the title of your vignette.
#' Ensure you have dependencies. if(!require(pacman)) install.packages("pacman", repos='http://cran.us.r-project.org') pacman::p_load(twitteR, yaml) #' This is the script that is run as a cron job. source("src/myscellany/degan_tweets/getRandomTweet.R") source("src/myscellany/degan_tweets/postRandomTweet.R") twitter_creds <- yaml.load_file("src/degan_creds.yaml")$twitter setup_twitter_oauth(consumer_key = twitter_creds$consumer_key, consumer_secret = twitter_creds$consumer_secret, access_token = twitter_creds$access_token, access_secret = twitter_creds$access_token_secret) result <- postRandomTweet() write(paste0(result, ", ", Sys.time()), file="src/myscellany/degan_tweets/log/tweet_log.txt",append=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.