An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100117/5b280752/attachment.pl>
Strange results from Windows 7
4 messages · Tse Ching Biu, Alan (MKT), Gabor Grothendieck, Joshua Wiley +1 more
Its likely that in one of your sessions you do have a diff and in the other you don't and this has nothing to do with XP vs. Windows 7. In the session with no diff, the only diff around is the function, diff, and you can't subscript a function. Try this to see what variables are in your workspace: ls() On Sun, Jan 17, 2010 at 4:40 AM, Tse Ching Biu, Alan (MKT)
<alan at baf.msmail.cuhk.edu.hk> wrote:
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]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Hello Alan, Following up on Gabor's suggestion, if you have different packages loaded, one of those packages could have a function 'diff' that would not show up with a call to ls() so you could also try search() which will show you what packages are loaded. HTH, Joshua On Sun, Jan 17, 2010 at 1:40 AM, Tse Ching Biu, Alan (MKT)
<alan at baf.msmail.cuhk.edu.hk> wrote:
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]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Joshua Wiley Senior in Psychology University of California, Riverside http://www.joshuawiley.com/
On 18/01/2010, at 9:02 AM, Joshua Wiley wrote:
Hello Alan, Following up on Gabor's suggestion, if you have different packages loaded, one of those packages could have a function
Object?
'diff' that would not show up with a call to ls() so you could also try search() which will show you what packages are loaded.
You could also try find() !!!
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}