I am working on Stocks' Analysis in R for Pakistan Stock Exchange. I am using "rvest" library and its tutorial at: https://github.com/hadley/rvest
Using this tutorial, I am trying to fetch the historical data into dataframes from this website: http://noormaier.net/kse-listed-companies-historical-prices-symbol-wise-2/
I have 2 questions:-
1) Using the above-mentioned tutorial, when I fetch the data using selectorgadget and the rest of the drill, the variable(list or the dataframe) in which the data is supposed to be stored is empty;
2) There are multiple tables on the above mentioned page which are accessed through a drop-down menu at the top of the page. When another value(Stock) is selected from the drop-down menu and submit button pressed, the relevant stock's data's table is loaded as the page gets reloaded but the Web Address of the page remains the same. The "Selector Part" obtained from the selectorgadget extension is also same for different stocks. If I need to access multiple Stock's data through the R Code, how will I differentiate between different stock's data.
Thanks in advance !
Here is the Code I have been using so far (with many alterations and experiments though):-
library(rvest)
web_link <- read_html("http://noormaier.net/kse-listed-companies-historical-prices//")
rating <- web_link %>%
html_nodes(".DataWidgetTable:nth-child(10) td") %>%
html_text() %>%