Created
January 24, 2019 13:07
-
-
Save flare9x/254e2f2cd20a0a19b263ea2b9bebc962 to your computer and use it in GitHub Desktop.
Obtain List of ETFS From nasdaq.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Obtain List of ETFS From nasdaq.com | |
# Andrew Bannerman 10.4.2017 | |
library(data.table) | |
# Read ETF list csv file from nasdaq.com | |
# Use fread() from data.table package | |
# install.packages("data.table") | |
read.data <- fread("http://www.nasdaq.com/investing/etfs/etf-finder-results.aspx?download=Yes") | |
# Subset Column 1, Symbol Column | |
symbol.col <- read.data$Symbol | |
# Export symbol column as .txt file | |
write.table(symbol.col,"D:/R Projects/etf list.us.txt",append=TRUE,quote=FALSE,row.names=FALSE,col.names=FALSE) | |
# Count ETF tickers | |
NROW(symbol.col) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment