library(tidyquant)
Loading required package: lubridate
Attaching package: <U+393C><U+3E31>lubridate<U+393C><U+3E32>
The following object is masked from <U+393C><U+3E31>package:plyr<U+393C><U+3E32>:
here
The following object is masked from <U+393C><U+3E31>package:base<U+393C><U+3E32>:
date
Loading required package: PerformanceAnalytics
Loading required package: xts
Loading required package: zoo
Attaching package: <U+393C><U+3E31>zoo<U+393C><U+3E32>
The following objects are masked from <U+393C><U+3E31>package:base<U+393C><U+3E32>:
as.Date, as.Date.numeric
Package PerformanceAnalytics (1.4.3541) loaded.
Copyright (c) 2004-2014 Peter Carl and Brian G. Peterson, GPL-2 | GPL-3
http://r-forge.r-project.org/projects/returnanalytics/
Attaching package: <U+393C><U+3E31>PerformanceAnalytics<U+393C><U+3E32>
The following object is masked from <U+393C><U+3E31>package:SDMTools<U+393C><U+3E32>:
Kappa
The following object is masked from <U+393C><U+3E31>package:graphics<U+393C><U+3E32>:
legend
Loading required package: quantmod
Loading required package: TTR
Version 0.4-0 included new data defaults. See ?getSymbols.
Learn from a quantmod author: https://www.datacamp.com/courses/importing-and-managing-financial-data-in-r
Loading required package: tidyverse
Loading tidyverse: tibble
Loading tidyverse: tidyr
Loading tidyverse: readr
Loading tidyverse: purrr
Loading tidyverse: dplyr
Conflicts with tidy packages ----------------------------------------
alpha(): ggplot2, kernlab
arrange(): dplyr, plyr
as.difftime(): lubridate, base
combine(): dplyr, randomForest
compact(): purrr, plyr
count(): dplyr, plyr
cross(): purrr, kernlab
date(): lubridate, base
extract(): tidyr, raster
failwith(): dplyr, plyr
filter(): dplyr, tibbletime, stats
first(): dplyr, xts
here(): lubridate, plyr
id(): dplyr, plyr
intersect(): lubridate, raster, base
lag(): dplyr, stats
last(): dplyr, xts
lift(): purrr, caret
margin(): ggplot2, randomForest
mutate(): dplyr, plyr
rename(): dplyr, plyr
select(): dplyr, raster
setdiff(): lubridate, base
summarise(): dplyr, plyr
summarize(): dplyr, plyr
union(): lubridate, raster, base
Attaching package: <U+393C><U+3E31>tidyquant<U+393C><U+3E32>
The following object is masked from <U+393C><U+3E31>package:dplyr<U+393C><U+3E32>:
as_tibble
The following object is masked from <U+393C><U+3E31>package:tibble<U+393C><U+3E32>:
as_tibble
Define a ggplot based function for plotting
FANG_tbl_d %>%
ggplot_facet_by_symbol(date, adjusted) +
labs(title = "FANG Stocks: Adjusted Prices 2014 through 2016")
Error in ggplot_facet_by_symbol(., date, adjusted) :
could not find function "ggplot_facet_by_symbol"