Hello,
 
I am a newbie.
 
I can run the following code stored in "test.txt" without error using my
XP machine:
 
x <- scan("C:\\Rwork\\A.txt")
x10 = filter(x, rep(1/10,10), sides=1) 
x
x10
for(i in 10:length(x)){
if (x[i] > x10[i]) diff[i]="b" else diff[i]="s"
}
 
However, if I run it in another PC that uses Windows 7, the following
error occurs:
 
> source("c:\\Rwork\\test.txt")
Read 290 items
Error in diff[i] = "b" : object of type 'closure' is not subsettable

I am using R 2.9.2.
 
Thank you for your help.
 
Alan

	[[alternative HTML version deleted]]

