Hi
I am quite new to R so not sure if this is something that is common knowledge but after some excessive googling I have not found a similar error
I'm looking for some assistance on a warning I am getting. I get the result that I am expecting in the form of a dataframe but when I try to insert the data into a ggplot in a shiny app the warning pops up instead of the graph. I've narrowed the warning down to the getting of stock prices from tq_get and removed everything bar what is causing the error. I've included a repex below also
The warning I am getting is:
#> Warning: type_convert()
only converts columns of type 'character'.
#> - df
has no columns of type 'character'
Any help is greatly appreciated!
library(tidyquant)
prices <- tq_get("TSLA",
get = "stock.prices",
from = "1990-01-01")
library(tidyquant)
#> Loading required package: lubridate
#>
#> Attaching package: 'lubridate'
#> The following objects are masked from 'package:base':
#>
#> date, intersect, setdiff, union
#> Loading required package: PerformanceAnalytics
#> Loading required package: xts
#> Loading required package: zoo
#>
#> Attaching package: 'zoo'
#> The following objects are masked from 'package:base':
#>
#> as.Date, as.Date.numeric
#>
#> Attaching package: 'PerformanceAnalytics'
#> The following object is masked from 'package:graphics':
#>
#> legend
#> Loading required package: quantmod
#> Loading required package: TTR
#> Registered S3 method overwritten by 'quantmod':
#> method from
#> as.zoo.data.frame zoo
#> == Need to Learn tidyquant? ====================================================
#> Business Science offers a 1-hour course - Learning Lab #9: Performance Analysis & Portfolio Optimization with tidyquant!
#> </> Learn more at: Learning Labs Pro | Business Science University </>
prices <- tq_get("TSLA",
get = "stock.prices",
from = "1990-01-01")
#> Warning: type_convert()
only converts columns of type 'character'.
#> - df
has no columns of type 'character'
Result:
prices
A tibble: 2,808 x 8
symbol date open high low close volume adjusted
1 TSLA 2010-06-29 3.8 5 3.51 4.78 93831500 4.78
2 TSLA 2010-06-30 5.16 6.08 4.66 4.77 85935500 4.77
3 TSLA 2010-07-01 5 5.18 4.05 4.39 41094000 4.39
4 TSLA 2010-07-02 4.6 4.62 3.74 3.84 25699000 3.84
5 TSLA 2010-07-06 4 4 3.17 3.22 34334500 3.22
6 TSLA 2010-07-07 3.28 3.33 3.00 3.16 34608500 3.16
7 TSLA 2010-07-08 3.23 3.50 3.11 3.49 38557000 3.49
8 TSLA 2010-07-09 3.52 3.58 3.31 3.48 20253000 3.48
9 TSLA 2010-07-12 3.59 3.61 3.4 3.41 11012500 3.41
10 TSLA 2010-07-13 3.48 3.73 3.38 3.63 13400500 3.63