I think you are confused about "markets". Of the three you listed, only NASDAQ is an exchange, the other two are information services. For the three major US exchanges, you go to:
(NASDAQ, AMEX, NYSE):
http://www.nasdaq.com/screening/company-list.aspx
Pick the one you are interested in and answer their silly robot barrier "puzzle" and download the csv file, in which the ticker symbol is the first column.
Edit: With TTR_0.20-3 from r-forge, the list appears more complete than with the prior version:
require(TTR)
SYMs <- TTR::stockSymbols()
#Fetching AMEX symbols...
#Fetching NASDAQ symbols...
#Fetching NYSE symbols...
table(SYMs$Exchange)
## AMEX NASDAQ NYSE
# 308 2820 3261
Whereas the csv file from NASDAQ for NASDAQ had 2820 symbols. On the other hand the TTR authors may have eliminated some of the duplicates, warrants or outdated symbols.