Skip to content

how to replace text...

2 messages · Jonathan Q., Sean Davis

#
if I have....

QQQQ<-priceIts("QQQQ",quote="Close")
QQQQ<-priceIts("QQQQ",quote="Close");plot(QQQQ)

and then i want to do the same thing but say with IBM instead of QQQQ
is there an easy way like replace qqqq/ibm

Thanks in advance./Jonathan
#
On Apr 29, 2005, at 6:11 AM, Jonathan Q. wrote:

            
You should probably use a list instead.  This is a FAQ (see 7.21):

http://cran.r-project.org/doc/FAQ/R-FAQ.html

Here is about how you might do it (untested):

pricelist <- list()

pricelist[['IBM']] <- pricelts('IBM',quote="Close")
pricelist[['QQQQ']] <- pricelts('QQQQ',quote="Close")

par(ask=T)
lapply(pricelist,plot)

Does this do what you want?

Sean