Re: [R] Question about error of non-numeric argument to binary operator

2006-10-11 Thread Yulei Gong
Thanks, Marc, I tried it and it didn't really work. x.num-as.numeric(x) is.numeric(x.num) [1] TRUE x.num-readClipboard() is.numeric(x.num) [1] FALSE is.character(x.num) [1] TRUE I use readClipboard to take in data, and it seems after the data is taken in, x.num changed to character. I just

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-11 Thread Marc Schwartz
Yulei, It would appear that the default mechanism for the function (which appears to be Windows specific) is to read in the data from the current system clipboard as a _character vector_. Thus, perhaps something like: x.num - as.numeric(readClipboard()) would be helpful. With respect to

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-11 Thread Yulei Gong
Marc, Thanks! x.num - as.numeric(readClipboard()) works perfect. Meanwhile, I have tried to use odbcConnectExcel from RODBC pack. It seems to work as well. I am able to read in the data, but I need to construct a sql table from the data, and use sqlFetch to retrieve and assign them to

[R] Question about error of non-numeric argument to binary operator

2006-10-10 Thread Yulei Gong
Hi, I have the following data and there is no binary operator contained, however, I still receive the error message when running unitrootTest function, could someone give me a guidance on it?? readClipboard() [1] 245246261.5 275.5 307284.5 289313.5 323.75 334 312.5 325

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-10 Thread Marc Schwartz
On Tue, 2006-10-10 at 22:35 -0400, Yulei Gong wrote: Hi, I have the following data and there is no binary operator contained, however, I still receive the error message when running unitrootTest function, could someone give me a guidance on it?? readClipboard() [1] 245246261.5