Re: [R] R wrong, Python rigth in calcution

2019-09-18 Thread Richard O'Keefe
Here's a tip for the original poster. > ?numeric and then follow the link it suggests > ?double which says amongst other things All R platforms are required to work with values conforming to the IEC 60559 (also known as IEEE 754) standard. This basically works with a precision of

Re: [R] R wrong, Python rigth in calcution

2019-09-17 Thread Abby Spurdle
> R by default uses floating-point arithmetic, which > is subject to problems described in [*]. Yes. I want to note that both graphics and modern statistics, require efficient floating point arithmetic. So, R does what it's designed to do... __

Re: [R] R wrong, Python rigth in calcution

2019-09-17 Thread Richard M. Heiberger
Your numbers are 70 bits long, R double precision numbers are 53 bits long. You need Rmpfr to get the higher precision. > log(569936821221962380720, 2) [1] 68.94936 > print(569936821221962380720, digits=22) [1] 569936821221962350592 > library(Rmpfr) > mpfr("569936821221962380720", 70) 1 'mpfr'

Re: [R] R wrong, Python rigth in calcution

2019-09-17 Thread Ivan Krylov
On Wed, 18 Sep 2019 00:02:47 +0200 Martin Møller Skarbiniks Pedersen wrote: > I know I can use gmp and R will do it correctly. Which is equivalent to what Python does: it uses so-called long arithmetic, allowing scalar variables with as many digits as it fits in the computer memory. R by

Re: [R] R wrong, Python rigth in calcution

2019-09-17 Thread Duncan Murdoch
On 17/09/2019 6:02 p.m., Martin Møller Skarbiniks Pedersen wrote: Hi, I don't understand why R computes this wrong. This is pretty well documented. R uses double precision floating point values for these expressions, which have about 15 digit precision. I believe for whole numbers

[R] R wrong, Python rigth in calcution

2019-09-17 Thread Martin Møller Skarbiniks Pedersen
Hi, I don't understand why R computes this wrong. I know I can use gmp and R will do it correctly. $ echo '569936821221962380720^3 + (-569936821113563493509)^3 + (-472715493453327032)^3' | Rscript - [1] -4.373553e+46 Correct answer is 3 and Python can do it: $ echo

Re: [R] R vs PYTHON vs SAS vs SPSS?

2017-11-30 Thread Hasan Diwan
uestion is this can I do everything in R and Python and SAS studio > that I did in SPSS and the paid variation of SAS we used in doctoral > statistics class? > Can I do in Stat in R or Python or SAS studio > everything I need to do in multiple regression; ANOVA; ANCOVA etc > ?

[R] R vs PYTHON vs SAS vs SPSS?

2017-11-30 Thread hotprojects
I am a mature learner; 3 masters some doctoral work “ statistics for social sciences; psychological statistics “ worked in spss and sas 2005 – 2006 now have forgotten ; relearning my question is this can I do everything in R and Python and SAS studio that I did in SPSS and the paid variation

Re: [R] R and Python

2015-03-01 Thread Wensui Liu
depending on what you want. if you'd like to run r within python, there are 2 solutions as far as i've known, either by rpys or by pyper. here is a brief comparison i did before https://statcompute.wordpress.com/2012/12/10/a-brief-comparison-between-rpy2-and-pyper/ On Sun, Mar 1, 2015 at 8:41 AM

[R] R and Python

2015-03-01 Thread linda.s
Is there any good example codes of integrating R and Python? Thanks. Linda [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] R and Python

2015-03-01 Thread Sarah Goslee
You mean like rPython? Or rpy? Or rpy2? Googling R Python is a great place to start. Sarah On Sun, Mar 1, 2015 at 9:41 AM, linda.s samrobertsm...@gmail.com wrote: Is there any good example codes of integrating R and Python? Thanks. Linda -- Sarah Goslee http://www.functionaldiversity.org

Re: [R] R and Python

2015-03-01 Thread Collin Lynch
for munging data in python and then passing it off to R for calculations. Collin. On Sun, Mar 1, 2015 at 10:17 AM, Sarah Goslee sarah.gos...@gmail.com wrote: You mean like rPython? Or rpy? Or rpy2? Googling R Python is a great place to start. Sarah On Sun, Mar 1, 2015 at 9:41 AM, linda.s

Re: [R] R and Python

2009-11-14 Thread lgautier
series analysis (xts, zoo, etc) and for my next project I am thinking of adding the Python language to the mix. The reason for adding Python is primarily its non-statistical capabilities. So my questions are what have people's experiences been with using interop between R and Python. I see

Re: [R] R and Python

2009-11-04 Thread Gabor Grothendieck
-statistical capabilities. So my questions are what have people's experiences been with using interop between R and Python. I see there are two items, rPy and RSPython. It looks like rPy makes it possible to call R code from Python, and RSPython goes both ways. My needs would be to use Python

Re: [R] R and Python

2009-11-04 Thread Doran, Harold
I use both python and R, but decided not to mix the two. I'd rather work directly in R for statistics, visual displays, etc. I really like python for pre-processing data, some preliminary data organization, and XML capes. -Original Message- From: r-help-boun...@r-project.org

Re: [R] R and Python

2009-11-04 Thread stephenb
-statistical capabilities. So my questions are what have people's experiences been with using interop between R and Python. I see there are two items, rPy and RSPython. It looks like rPy makes it possible to call R code from Python, and RSPython goes both ways. My needs would be to use Python

Re: [R] R and Python

2009-11-04 Thread baptiste auguie
Hi, It looks like SAGE might be another option, http://www.sagemath.org/index.html though I never tried it. HTH, baptiste __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] R and Python

2009-11-02 Thread Ryan Sheftel
with using interop between R and Python. I see there are two items, rPy and RSPython. It looks like rPy makes it possible to call R code from Python, and RSPython goes both ways. My needs would be to use Python to drive R to get it's extensive time series and stats, and also to get to Python objects from

[R] R and Python

2009-11-02 Thread Ryan Sheftel
with using interop between R and Python. I see there are two items, rPy and RSPython. It looks like rPy makes it possible to call R code from Python, and RSPython goes both ways. My needs would be to use Python to drive R to get it's extensive time series and stats, and also to get to Python objects from

[R] R vs Python performance-wise

2008-12-06 Thread Jose Quesada
Hi, Has anyone run any R vs Python (numpy) tests? I'd love to see what the differences performance-wise are, specially handling large sparse matrices. Since both rely on external C code, there might not be much of a difference. If you know and use both languages, what are the main

Re: [R] R vs Python performance-wise

2008-12-06 Thread Martin Maechler
JQ == Jose Quesada [EMAIL PROTECTED] on Sat, 06 Dec 2008 12:28:34 +0100 writes: JQ Hi, Has anyone run any R vs Python (numpy) tests? I'd JQ love to see what the differences performance-wise are, JQ specially handling large sparse matrices. Since both JQ rely on external C