- PrivateIndex
- Related: Intro Data Science Time Series Analysis
if you’ve stumbled upon this you’ve found a bunch of my **R** Scripts that I use as snippets, they’re all a bit of a mess, generally the idea is:
- Clone the repo
- Set up Vim:
- Use this index to jump to the **R** Script / **R** Markdown /
org-babel
, You’ll want these:
- use
SPC k r
orSPC k s
to knit or spin the HTML- I haven’t been good with roxygen comments
- This is incomplete, if you need to fix links use
C-x C-j
andSpc f f
as theyre implemented in the DotFiles in order to fix it them
#* Template #** Inline Code
adv$MeanAdvertising <- rowMeans(adv[,c(!(names(adv) == "Sales"))])
AdvTVPlot <- ggplot(data = adv, aes(x = TV, y = Sales, col = MeanAdvertising)) +
geom_point() +
theme_bw() +
stat_smooth(method = 'lm', formula = y ~ poly(x, 2, raw = TRUE), se = FALSE) +
##stat_smooth(method = 'lm', formula = y ~ log(x), se = FALSE) +
labs(col = "Mean Advertising", x= "TV Advertising")
print(AdvTVPlot)
if(knitr::is_html_output()){
ggplotly(knitr::is_latex_output())
} else {
AdvTVPlot
}
These Files include:
- /todo,merge these
- Summarising Data
- LinearRegression
- Multiple Linear Regression
- Logistic Regression
- Cross Validation and BootStrapping
- Tree Based Methods
- Support Vector Machines
- Principal Component Analysis
- Clustering
- Polynomial Snippet
- Rmd Chunks Snippet
I did do this as an org file to, I like it but I think nvim-r
is just easier
to use, albeit a little janky, I include this below merely as an example, refer
to the actual file in the Notes Repo.
<<bibliography link>> bibliography:/home/ryan/Dropbox/Studies/Papers/references.bib
<<bibliographystyle link>> bibliographystyle:unsrt
\printbibliography