Hi Jeff,

Thanks for your advice.  quantmod can do the job nicely.

I just found yahooImport on searching a R package to download stock data from 
Internet direct to Excel/Calc on the fly.  Excel/Calc have built-in browser to 
download stock data direct from Internet to spreadsheet.  Graphs/charts can be 
plotted on their packages directly.  finance.yahoo.com/google also have tools to 
download stock data direct to spreadsheet, both to Excel/Calc.  I'm looking for 
a different way on R, if any.

B.R.
Stephen L






________________________________
From: Jeff Ryan <jeff.a.ryan@gmail.com>

Cc: r-sig-finance@r-project.org
Sent: Wed, December 15, 2010 1:08:55 PM
Subject: Re: [R-SIG-Finance] About yahooImport to display output on R console

Hi Stephen,

Try:

library(quantmod)

getSymbols("IBM")
getSymbols("IBM", src="google")

Both will autoload into your global environment, though this is settable.

HTH
Jeff


> Hi all,
>
> OS - Ubuntu 1010 desktop 64bit w/o gui
>
>> require('fImport')
> Loading required package: fImport
> Loading required package: timeDate
> Loading required package: timeSeries
>
>> yahooImport("IBM")
> trying URL
> 'http://chart.yahoo.com/table.csv?s=IBM&a=&b=&c=&d=11&e=15&f=2010&g=d&x=.csv'
> Content type 'text/csv' length unknown
> opened URL
> .......... .......... .......... .......... ..........
> .......... .......... .......... .......... ..........
> .......... .......
> downloaded 617 Kb
>
> It won't display the data on R console
>
>
> I must run;
>> yahooImport("IBM", file="IBM.csv", save=T)
> to save the file.
>
>> list.files(getwd(), full.name=T)
>  [1] "/home/satimisub1010dk02/Desktop"
>  [2] "/home/satimisub1010dk02/Documents"
>  [3] "/home/satimisub1010dk02/Downloads"
>  [4] "/home/satimisub1010dk02/examples.desktop"
>  [5] "/home/satimisub1010dk02/IBM.csv"
> .....
> ....
>
>
> I looked at ?yahooImport and couldn't resolve making it display the stock data
> on R console.  Any advice?
>
>
> Besides is there a tool to download stock data from Google finance instead of
> using their download tool?
>
> TIA
>
> B.R.
> Stephen L
>
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should 
>go.
>



-- 
Jeffrey Ryan
jeffrey.ryan@lemnica.com

www.lemnica.com



	[[alternative HTML version deleted]]

