This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.

Do these first

# Load these libraries (every time you start RStudio)
library(ChannelAttribution)
library(reshape)
library(ggplot2)
data(PathData) 
Data

Build the simple heuristic models (First Click/first_touch, Last Click/last_touch and Linear Attribution/linear_touch):

H <- heuristic_models(Data, 'path', 'total_conversions', var_value='total_conversion_value')
H

Session Information

The R session information for compiling this doc is shown below

sessionInfo()
## R version 3.4.4 (2018-03-15)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 8.1 x64 (build 9600)
## 
## Matrix products: default
## 
## locale:
## [1] LC_COLLATE=English_United States.1252 
## [2] LC_CTYPE=English_United States.1252   
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.1252    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] ggplot2_3.1.0           reshape_0.8.8           ChannelAttribution_1.14
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.0       compiler_3.4.4   pillar_1.3.0     plyr_1.8.4      
##  [5] bindr_0.1.1      tools_3.4.4      digest_0.6.18    jsonlite_1.5    
##  [9] evaluate_0.10.1  tibble_1.4.2     gtable_0.2.0     pkgconfig_2.0.1 
## [13] rlang_0.3.0.1    yaml_2.2.0       bindrcpp_0.2.2   withr_2.0.0     
## [17] stringr_1.3.1    dplyr_0.7.8      knitr_1.20       rprojroot_1.3-2 
## [21] grid_3.4.4       tidyselect_0.2.4 glue_1.3.0       R6_2.2.2        
## [25] rmarkdown_1.10   purrr_0.2.5      magrittr_1.5     backports_1.1.0 
## [29] scales_1.0.0     htmltools_0.3.6  assertthat_0.2.0 colorspace_1.3-2
## [33] stringi_1.2.4    lazyeval_0.2.0   munsell_0.5.0    crayon_1.3.4

Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Ctrl+Alt+I.

When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Ctrl+Shift+K to preview the HTML file).

The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.