On 27/07/2014, 10:36 AM, Joseph Kunkel wrote:
> Dear R-sig-Mac,
>
> Sorry, this was sent via another email(non-SIG-member instance) and I am
> resending this in order to get consideration perhaps more quickly.
>
> I have a problem with output from the R.app GUI which is at odds in part with
> the Terminal console output which I prefer. The GUI does debug requests
> interspersed with the desired output.
>
> My system is:
>
> Model Name: MacBook Pro
> Model Identifier: MacBookPro10,1
> Processor Name: Intel Core i7
> Processor Speed: 2.7 GHz
> Number of Processors: 1
> Total Number of Cores: 4
> L2 Cache (per Core): 256 KB
> L3 Cache: 6 MB
> Memory: 16 GB
> System Software Overview:
> System Version: OS X 10.9.4 (13E28)
> Kernel Version: Darwin 13.3.0
>
> R version 3.1.1 (2014-07-10) -- "Sock it to Me"
> Copyright (C) 2014 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> R.app GUI 1.65 (6784 Snow Leopard build), S.
>
> An R-script accesses an array XX which has ...
>
>> attributes(XX)
> $dim
> [1] 12 3 8
>
> The R-script that gives me the problem:
> # GetCL.R
> for (i in 1:4) { out<- round(((sum((XX[3,,i]-XX[10,,i])^2))^0.5 +
> (sum((XX[2,,i]-XX[10,,i])^2))^0.5)/2,3)
> cat(out,'\n')
> }
>
> The correct output obtained in Terminal mode is:
>
>> source("GetCL.R")
> 35.791
> 35.811
> 44.625
> 43.316
>
> In the GUI I get:
>
>> source("GetCL.R")
> debug at GetCL.R#3: out <- round(((sum((XX[3, , i] - XX[10, , i])^2))^0.5 +
> (sum((XX[2,
> , i] - XX[10, , i])^2))^0.5)/2, 3)
> Browse[2]>
etc.
That's not normal output. It's hard to guess exactly what's going
wrong, but perhaps you have set a hook somewhere (see ?getHook), or have
an option set that is not obvious, or have some code in your workspace
that is interfering with normal evaluation.
Duncan Murdoch
> debug at GetCL.R#4: cat(out, "\n")
> Browse[2]>
> 35.791
> debug at GetCL.R#3: out <- round(((sum((XX[3, , i] - XX[10, , i])^2))^0.5 +
> (sum((XX[2,
> , i] - XX[10, , i])^2))^0.5)/2, 3)
> Browse[2]>
> debug at GetCL.R#4: cat(out, "\n")
> Browse[2]>
> 35.811
> debug at GetCL.R#3: out <- round(((sum((XX[3, , i] - XX[10, , i])^2))^0.5 +
> (sum((XX[2,
> , i] - XX[10, , i])^2))^0.5)/2, 3)
> Browse[2]>
> debug at GetCL.R#4: cat(out, "\n")
> Browse[2]>
> 44.625
> debug at GetCL.R#3: out <- round(((sum((XX[3, , i] - XX[10, , i])^2))^0.5 +
> (sum((XX[2,
> , i] - XX[10, , i])^2))^0.5)/2, 3)
> Browse[2]>
> debug at GetCL.R#4: cat(out, "\n")
> Browse[2]>
> 43.316
>
> Of course this output gets more tedious if I try to process the entire array
> by running for i in 1:larger-n.
> Is there any way to get rid of these debug and browse messages messages in
> GUI mode?
> I have never experienced this debug output in my ca. 12+ years of using R
> intensely.
>
> I just recently upgraded to R version 3.1.1 (2014-07-10) and renewed all my
> libraries.
>
> -·. .· ·. .><((((º>·. .· ·. .><((((º>·. .· ·. .><((((º> .··.· >=-
> =º}}}}}><
> Joseph G. Kunkel, Emeritus Professor
> Biology Department
> UMass Amherst
> Amherst MA 01003
> [email protected]
>
> _______________________________________________
> R-SIG-Mac mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac