After downloading the zip file, use only the "prescribable" portion. (that are drugs currently approved for use, without many "historical" drugs)
The main file is RXCONSO.RRF which is 28MB.
It has 113290 rows and contains many different types of rows (e.g., synonyms).
To filter only ingredients, using R, do this:
conso<-read.delim(file = 'RXNCONSO.RRF', sep='|',header = F, stringsAsFactors=F)
conso[3:7] <- list(NULL) #not used in this distribution, only in full UMLS
column names can be seen here
http://www.nlm.nih.gov/research/umls/rxnorm/docs/2014/rxnorm_doco_full_2014-2.html#s12_4
names(conso)[1] <- 'rxcui'
names(conso)[3] <- 'rxaui'
names(conso)[7] <- 'sab' #12
names(conso)[8] <- 'tty' #13
names(conso)[10] <- 'str' #15
Use TTY term type column - value BN=Brand Name
#only brand names
bn<-subset(conso,tty=='BN',select=c('rxcui','str'))
and in bn data.frame is your result.
Sample result would look like this:
> head(bn,5)
rxcui str
1 38 Parlodel
73 332 Adipex-P
107 479 Alfenta
187 756 Anafranil
188 769 Anaspaz
In fact, to get only generic ingredient names, a similar query can be used like this:
#get only ingredients and CUI and name for each intredient
ingr<-subset(conso,tty=='IN',select=c('rxcui','str'))