Difference between R for the Mac and for Windows

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Difference between R for the Mac and for Windows

Neil Salkind
Can someone please direct me to an answer to the question as to how R differs for these two operating systems, if at all? Thanks - Neil
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

Boris Steipe
I can't remember having seen my students write code that runs correctly on one platform but not the other. Obviously under the hood there are significant differences, but as far as code goes, R seems quite foolproof. There are GUI differences in base R - but AFAIK no such differences in the RStudio IDE.

B.




> On Mar 30, 2017, at 9:21 PM, Neil Salkind <[hidden email]> wrote:
>
> Can someone please direct me to an answer to the question as to how R differs for these two operating systems, if at all? Thanks - Neil
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

David Winsemius

> On Mar 30, 2017, at 8:40 PM, Boris Steipe <[hidden email]> wrote:
>
> I can't remember having seen my students write code that runs correctly on one platform but not the other. Obviously under the hood there are significant differences, but as far as code goes, R seems quite foolproof. There are GUI differences in base R - but AFAIK no such differences in the RStudio IDE.
>
> B.
>
>

The Mac version of R is more like the Linux version when run from the UNIX command line. RStudio and the R.app GUI's are both nice IDE's. A few packages are not available because of the need to link to programs that are only available on a particular OS. You can see which ones with a visit to the Cran package checks pages.

--
David


>
>
>> On Mar 30, 2017, at 9:21 PM, Neil Salkind <[hidden email]> wrote:
>>
>> Can someone please direct me to an answer to the question as to how R differs for these two operating systems, if at all? Thanks - Neil
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

Peter Dalgaard-2
In reply to this post by Boris Steipe
File encodings differ when you move outside of standard ASCII code. Not really R's problem, but it is a fly in the ointment when teaching classes with mixed laptop armoury and there are also differences between classroom and desktop computers. RStudio does have features to switch encodings, but I usually sidestep the issue by commenting scripts in English.

-pd

> On 31 Mar 2017, at 05:40 , Boris Steipe <[hidden email]> wrote:
>
> I can't remember having seen my students write code that runs correctly on one platform but not the other. Obviously under the hood there are significant differences, but as far as code goes, R seems quite foolproof. There are GUI differences in base R - but AFAIK no such differences in the RStudio IDE.
>
> B.
>
>
>
>
>> On Mar 30, 2017, at 9:21 PM, Neil Salkind <[hidden email]> wrote:
>>
>> Can someone please direct me to an answer to the question as to how R differs for these two operating systems, if at all? Thanks - Neil
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

Ista Zahn
In reply to this post by Neil Salkind
The only place I've noticed differences is in encoding and string sorting,
both of which are locale and library dependent.

Best,
Ista

On Mar 31, 2017 8:14 AM, "Neil Salkind" <[hidden email]> wrote:

> Can someone please direct me to an answer to the question as to how R
> differs for these two operating systems, if at all? Thanks - Neil
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

Berend Hasselman

I have noted a difference between R on macOS en on Kubuntu Trusty (64bits) with complex division.
I don't know what would happen R on Windows.

R.3.3.3:

macOS (10.11.6)
-----------------
> (1+2i)/0
[1] NaN+NaNi
> (-1+2i)/0
[1] NaN+NaNi
>
> 1i/0
[1] NaN+NaNi
> 1i/(0+0i)
[1] NaN+NaNi


KubuntuTrusty
-----------------
> (1+2i)/0
[1] Inf+Infi
> (-1+2i)/0
[1] -Inf+Infi
>
> 1i/0
[1] NaN+Infi
> 1i/(0+0i)
[1] NaN+Infi

Interesting to see what R on Windows delivers.

Berend Hasselman

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

Uwe Ligges-3


On 31.03.2017 19:15, Berend Hasselman wrote:

>
> I have noted a difference between R on macOS en on Kubuntu Trusty (64bits) with complex division.
> I don't know what would happen R on Windows.
>
> R.3.3.3:
>
> macOS (10.11.6)
> -----------------
>> (1+2i)/0
> [1] NaN+NaNi
>> (-1+2i)/0
> [1] NaN+NaNi
>>
>> 1i/0
> [1] NaN+NaNi
>> 1i/(0+0i)
> [1] NaN+NaNi
>
>
> KubuntuTrusty
> -----------------
>> (1+2i)/0
> [1] Inf+Infi
>> (-1+2i)/0
> [1] -Inf+Infi
>>
>> 1i/0
> [1] NaN+Infi
>> 1i/(0+0i)
> [1] NaN+Infi
>
> Interesting to see what R on Windows delivers.

Same as KubuntuTrusty and what I would expect.

Best,
Uwe Ligges



>
> Berend Hasselman
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

John McKown
In reply to this post by Berend Hasselman
On Fri, Mar 31, 2017 at 12:15 PM, Berend Hasselman <[hidden email]> wrote:

>
> I have noted a difference between R on macOS en on Kubuntu Trusty (64bits)
> with complex division.
> I don't know what would happen R on Windows.
>
> R.3.3.3:
>
> macOS (10.11.6)
> -----------------
> > (1+2i)/0
> [1] NaN+NaNi
> > (-1+2i)/0
> [1] NaN+NaNi
> >
> > 1i/0
> [1] NaN+NaNi
> > 1i/(0+0i)
> [1] NaN+NaNi
>
>
> KubuntuTrusty
> -----------------
> > (1+2i)/0
> [1] Inf+Infi
> > (-1+2i)/0
> [1] -Inf+Infi
> >
> > 1i/0
> [1] NaN+Infi
> > 1i/(0+0i)
> [1] NaN+Infi
>
> Interesting to see what R on Windows delivers.
>

​> (1+2i)/0
[1] Inf+Infi
> (-1+2i)/0
[1] -Inf+Infi
> 1i/0
[1] NaN+Infi
> 1i/(0+0i)
[1] NaN+Infi
> Sys.info()
                     sysname                      release
                   "Windows"                      "7 x64"
                     version                     nodename
"build 7601, Service Pack 1"                 "IT-JMCKOWN"
                     machine                        login
                    "x86-64"                "John.Mckown"
                        user               effective_user
               "John.Mckown"                "John.Mckown"
>

Same as Kubuntu. I am _guessing_ that the MacOS somehow sets up the
floating point processing to work differently, since they are all on Intel
machines nowadays. Or the R was customized to detect division by zero in
software and not really do any floating point processing at all.


>
> Berend Hasselman
>
>

--
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion

Maranatha! <><
John McKown

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

Berend Hasselman

> On 31 Mar 2017, at 19:28, John McKown <[hidden email]> wrote:
>
> On Fri, Mar 31, 2017 at 12:15 PM, Berend Hasselman <[hidden email]> wrote:
>
> I have noted a difference between R on macOS en on Kubuntu Trusty (64bits) with complex division.
> I don't know what would happen R on Windows.
>
> R.3.3.3:
>
> macOS (10.11.6)
> -----------------
> > (1+2i)/0
> [1] NaN+NaNi
> > (-1+2i)/0
> [1] NaN+NaNi
> >
> > 1i/0
> [1] NaN+NaNi
> > 1i/(0+0i)
> [1] NaN+NaNi
>
>
> KubuntuTrusty
> -----------------
> > (1+2i)/0
> [1] Inf+Infi
> > (-1+2i)/0
> [1] -Inf+Infi
> >
> > 1i/0
> [1] NaN+Infi
> > 1i/(0+0i)
> [1] NaN+Infi
>
> Interesting to see what R on Windows delivers.
>
> ​> (1+2i)/0
> [1] Inf+Infi
> > (-1+2i)/0
> [1] -Inf+Infi
> > 1i/0
> [1] NaN+Infi
> > 1i/(0+0i)
> [1] NaN+Infi
> > Sys.info()
>                      sysname                      release
>                    "Windows"                      "7 x64"
>                      version                     nodename
> "build 7601, Service Pack 1"                 "IT-JMCKOWN"
>                      machine                        login
>                     "x86-64"                "John.Mckown"
>                         user               effective_user
>                "John.Mckown"                "John.Mckown"
> >
>
> Same as Kubuntu. I am _guessing_ that the MacOS somehow sets up the floating point processing to work differently, since they are all on Intel machines nowadays. Or the R was customized to detect division by zero in software and not really do any floating point processing at all.
> ​
>

I think it's the system math library that does this.

I have assumed that the Kubuntu Trusty (and Windows) give the correct result.
In my package geigen I have taken that into account and made a specialized complexdivision function that tries to detect a possibly wrong outcome (which appears to happen only on macOS).

Berend Hasselman

> Berend Hasselman
>
>
>
> --
> "Irrigation of the land with seawater desalinated by fusion power is ancient. It's called 'rain'." -- Michael McClary, in alt.fusion
>
> Maranatha! <><
> John McKown

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between R for the Mac and for Windows

Peter Dalgaard-2
In reply to this post by Berend Hasselman
[This is drifting somewhat awy from the original intention of the topic, I think].

This looks like a build dependency. I get

3.3.2 (yeah, I know, should upgrade):

> (1+2i)/0
[1] NaN+NaNi

R-devel, march 24:

> (1+2i)/0
[1] Inf+Infi

on the *same* machine. The difference is that one is stock CRAN, the other was built locally. So with the toolchain being updated for 3.4.0, this difference would likely go away. Or at least change...

-pd


> On 31 Mar 2017, at 19:15 , Berend Hasselman <[hidden email]> wrote:
>
>
> I have noted a difference between R on macOS en on Kubuntu Trusty (64bits) with complex division.
> I don't know what would happen R on Windows.
>
> R.3.3.3:
>
> macOS (10.11.6)
> -----------------
>> (1+2i)/0
> [1] NaN+NaNi
>> (-1+2i)/0
> [1] NaN+NaNi
>>
>> 1i/0
> [1] NaN+NaNi
>> 1i/(0+0i)
> [1] NaN+NaNi
>
>
> KubuntuTrusty
> -----------------
>> (1+2i)/0
> [1] Inf+Infi
>> (-1+2i)/0
> [1] -Inf+Infi
>>
>> 1i/0
> [1] NaN+Infi
>> 1i/(0+0i)
> [1] NaN+Infi
>
> Interesting to see what R on Windows delivers.
>
> Berend Hasselman
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.