Re: [R] Using string to call/manipulate an object

2011-02-23 Thread David Winsemius
On Feb 23, 2011, at 10:23 AM, Kushan Thakkar wrote: @Scott: I can't just use colnames(IBM) <- c("open","high","low","close","vol") Well, you can. I have nearly 100 tickers stored in an vector and I am looping through them. Its not a good idea to hardcode all of them. Perhaps putting t

Re: [R] Using string to call/manipulate an object

2011-02-23 Thread Gabor Grothendieck
On Wed, Feb 23, 2011 at 8:55 AM, Kushan Thakkar wrote: > I am using getSymbols function from quantmod package to get price data from > internet. > > Currently I have: > > my.ticker <- "IBM" > getSymbols(my.ticker,src="google") > > This  creates an xts object named my.ticker which contains historic

Re: [R] Using string to call/manipulate an object

2011-02-23 Thread Jonathan P Daily
when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it." - Jubal Early, Firefly r-help-boun...@r-project.org wrote on 02/23/2011 10:23:35 AM: > [image removed] > > Re: [R] Using string to call/manipulate an object > > Kushan T

Re: [R] Using string to call/manipulate an object

2011-02-23 Thread Scott Chamberlain
this works: colnames(IBM) <- c("open","high","low","close","vol") scott On Wednesday, February 23, 2011 at 7:55 AM, Kushan Thakkar wrote: > colnames(my.ticker) <- c("open","high","low","close","vol") [[alternative HTML version deleted]] __ R

Re: [R] Using string to call/manipulate an object

2011-02-23 Thread Kushan Thakkar
@Scott: I can't just use colnames(IBM) <- c("open","high","low","close","vol") I have nearly 100 tickers stored in an vector and I am looping through them. Its not a good idea to hardcode all of them. @David: Column names is just an example. I have a long script that takes in an xts object and

Re: [R] Using string to call/manipulate an object

2011-02-23 Thread David Winsemius
On Feb 23, 2011, at 8:55 AM, Kushan Thakkar wrote: I am using getSymbols function from quantmod package to get price data from internet. Currently I have: my.ticker <- "IBM" getSymbols(my.ticker,src="google") This creates an xts object named my.ticker which contains historical price da

[R] Using string to call/manipulate an object

2011-02-23 Thread Kushan Thakkar
I am using getSymbols function from quantmod package to get price data from internet. Currently I have: my.ticker <- "IBM" getSymbols(my.ticker,src="google") This creates an xts object named my.ticker which contains historical price data for IBM. How can I call and manipulating this xts object