Closed Theo1996 closed 4 months ago
Your example doesn't use quantmod, and it doesn't run because b
isn't defined.
I'm guessing you want something like: quantmod::getSymbols(importedtxt$Symbol)
.
I omitted both package and b variable, but they do exist properly. Though I did make a mistake the output of getsymbols(importedtxt) is NULL even , Your guess was right, I was mainly tryingimportedtxt[0]
and importedtxt[1]
etc and now I tried importedtxt[,1]
and it works too. Thank you!
Description
I am importing a txt file,with read.delim() . the text file contains this but verically:
I can get it to work if use this loop:
But if I use as.list or as.character to convert it, the output in the console of this commands shows the correct format:
but its not a character value, and if I use it in
getSymbols(importedtxt)
it throws the errorExpected behavior
It should take each row or element in the data and get stock prices for that symbol.
Minimal, reproducible example
Session Info