Sir,
     This code give the answer but i have a doubt,
i need to retrieve the data of more than one tickers so i used the code
like this

v=c("IBM","AA")
library(quantmod)
#v1 = getSymbols(v, auto.assign = TRUE)
#v1
print ="-------------------------------------------------"
for(i in (getSymbols(v, auto.assign = TRUE))){
cat("to.yearly(",i, ")\n")
to.yearly(i)
#to.yearly(IBM)
}

this also shows the same error
 "Error in try.xts(x) :
  Error in UseMethod("as.xts") :   no applicable method for 'as.xts'
applied to an object of class "character"

Actually i need to find out the best ticker based from teh site(yahoo) .
if i have 3 ticker like "IBM,AA,MSFT" i need to fidn out the best ticker
from these, based on the yearly performance

Am newly started the 'R' so i haven't more idea about this . can u help me
plz

Thank you




--
View this message in context: http://r.789695.n4.nabble.com/to-yearly-tp4646723p4646959.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]


