Should you be using rsiTA(tsx[,2],14). If you look at the function you will see it is expecting just the values you want in the calculation.
If you give it a matrix it treats the whole matrix as being price data. Tom > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Neuro > LeSuperHéros > Sent: Wednesday, 20 April 2005 8:58 AM > To: r-help@stat.math.ethz.ch > Subject: [R] fSeries Technical Analysis rsiTA problem > > > fSeries Technical Analysis rsiTA problem > > Hello, > > I'm trying to use the rsiTA() function but keep getting this error: > > >rsiTA(tsx,14) > Error in "[.timeSeries"(close, 1:(length(close) - 1)) : > only 0's may be mixed with negative subscripts > > Here's is the first three lines of my data: > >tsx[1:3,] > close > 2004-04-18 20:00:00 8702.82 > 2004-04-19 20:00:00 8602.98 > 2004-04-20 20:00:00 8573.05 > > I have 250 days of data. > > Here's the class > >class(tsx) > [1] "timeSeries" > attr(,"package") > [1] "fBasics" > > And here's my version: > > >version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 2 > minor 1.0 > year 2005 > month 04 > day 18 > language R > > I did load the libraries > library(fSeries) > library(fBasics) > > Regards, > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html