Project-2

ST 558 Project 2


Project maintained by kafrazi2 Hosted on GitHub Pages — Theme by mattgraham

ST 558 Project 2

Kaylee Frazier and Rebecca Voelker 10/31/2021

Description

This repo includes analysis on the online news popularity data set. It subsets the data into six documents subsetted from the data’s channel name. In this repo, we summarize the data and then try to predict the number of shares using predictive modeling.

Packages

This is the list of the packages used.

Links

These are links to the generated analyses.

Code

#get unique names
channelIDs <- unique(rawDataNew$data_channel)
#create file names
output_file <- paste0(channelIDs, ".md")
#create a list for each channel with just the channel name parameter
params = lapply(channelIDs, FUN = function(x){list(data_channel = x)})

#put into a data frame
reports <- tibble(output_file, params)
#read in library
library(rmarkdown)
#need to use x[[1]] to get at elements since tibble doesn't simplify
apply(reports, MARGIN = 1, 
            FUN = function(x){
                render(input = "ST558_Project2.Rmd", output_file = x[[1]], params = x[[2]])
                })