Displaying 20 results from an estimated 9000 matches similar to: "Rmpfr: build vector sequentially -- c(.) not working"
2010 Oct 16
1
Rmpfr question
Hi:
I'm trying to reproduce an arbitrary precision constant from 'Why and
How to Use Arbitrary Precision' (Ghazi et al., COMPUTING IN SCIENCE &
ENGINEERING May/June 2010;
http://perso.ens-lyon.fr/philippe.theveny/cise.pdf):
d = 173746a + 94228b ? 78487c
where: a = sin(1022), b = log(17.1), and c = exp(0.42).
Ghazi et al. report: d = ?1.341818958e?12 whit IEEE-754 quadruple
2016 Sep 10
3
c(<Matrix>, <Matrix>) / help(dotsMethods) etc
I have been asked (by Roger; thank you for the good question,
and I hope it's fine to answer to the public) :
> with Pi a sparse matrix and x,y, and ones
> compatible n-vectors ? when I do:
>> c(t(x) %*% Pi %*% ones, t(ones) %*% Pi %*% y )
> [[1]] 1 x 1 Matrix of class "dgeMatrix"
> [,1] [1,]
> 0.1338527
>
2016 Sep 10
1
c(<Matrix>, <Matrix>) / help(dotsMethods) etc
>>>>> John Chambers <jmc at r-project.org>
>>>>> on Sat, 10 Sep 2016 09:16:38 -0700 writes:
> (Brief reply, I'm traveling but as per below, this is on my radar right now so wanted to comment.)
> Two points regarding "dotsMethods".
> 1. To clarify the limitation. It's not that all the arguments have to be of the same
2019 Jun 03
2
Converting non-32-bit integers from python to R to use bit64: reticulate
Thank you Martin for giving to know and developing 'Rmpfr' library for
unlimited size integers (GNU C GMP) and arbitrary precision floats (GNU C
MPFR):
https://cran.r-project.org/package=Rmpfr
My question is: In the long term (For R3.7.0 or R3.8.0):
Does it have sense that CMP substitutes INTSXP, and MPFR substitutes
REALSXP code? With this we would achieve that an integer is always an
2013 Sep 20
1
Rmpfr question
Hello everyone,
R beginner, I am confronted with the need to use Rmpf.
In my first scripts I made use of
X=read.table(file.choose(), header=FALSE, sep=",",dec=".")
X=as.matrix(X)
to load into a matrix data from file before matrix use.
How can I do to load the same data in a "mpfrMatrix".
Is it possible to use with "mpfrMatrix" the same as operations
2016 Nov 15
2
ifelse() woes ... can we agree on a ifelse2() ?
All,
Martin: Thanks for this and all the other things you are doing to both
drive R forward and engage more with the community about things like this.
Apologies for missing this discussion the first time it came around and if
anything here has already been brought up, but I wonder what exactly you
mean when you want recycling behavior.
Specifically, based on an unrelated discussion with Henrik
2016 Aug 06
4
ifelse() woes ... can we agree on a ifelse2() ?
Dear R-devel readers,
( = people interested in the improvement and development of R).
This is not the first time that this topic is raised.
and I am in now state to promise that anything will result from
this thread ...
Still, I think the majority among us has agreed that
1) you should never use ifelse(test, yes, no)
if you know that length(test) == 1, in which case
if(test) yes
2016 Sep 10
0
c(<Matrix>, <Matrix>) / help(dotsMethods) etc
(Brief reply, I'm traveling but as per below, this is on my radar right now so wanted to comment.)
Two points regarding "dotsMethods".
1. To clarify the limitation. It's not that all the arguments have to be of the same class, but there must be one class that they belong to or subclass. (So, as in the example in the documentation, the method could be defined for a class
2018 Feb 02
0
mpfr and gsl problem on SLES11 SP4
Dear Team,
Maybe somebody already tried to install mpfr and gsl packages for R on SLES.
Exactly I try to install Rmpfr_0.6-1.tar.gz and gsl_1.9-10.3.tar.gz on SLES11 SP4.
These are the available packages from official SLES SDK media:
rtest:/home/ruser # rpm -qa | grep -i gsl
gsl-devel-1.11-1.30
gsl-1.11-1.30
rtest:/home/ruser #
As I understand gsl is from 1.11 till 1.30 level.
2016 Nov 26
3
ifelse() woes ... can we agree on a ifelse2() ?
Just stating, in 'ifelse', 'test' is not recycled. As I said in "R-intro: length of 'ifelse' result" (https://stat.ethz.ch/pipermail/r-devel/2016-September/073136.html), ifelse(condition, a, b) returns a vector of the length of 'condition', even if 'a' or 'b' is longer.
On current 'ifelse' code in R:
* The part
ans[nas] <- NA
2015 Apr 30
0
R CMD check and missing imports from base packages
>>>>> G?bor Cs?rdi <csardi.gabor at gmail.com>
>>>>> on Wed, 29 Apr 2015 23:07:09 -0400 writes:
> On Wed, Apr 29, 2015 at 8:12 PM, Paul Gilbert <pgilbert902 at gmail.com> wrote:
>>
>> As I recall, several packages mask the simulate generic in stats, if you
>> are looking for examples.
>>
> FWIW,
2011 Oct 28
1
Question about how to compile .zip for Windows
Dear all,
Thanks for Baptiste's help. He offered me the website
http://win-builder.r-project.org/ This is very good.
However, I face another problem recently that I need to program a package,
which require 'multiple-precision floating-point computations'. I found that
MPFR is very good tools. It can be installed on the linux system, if you
want to use it just include some head
2015 Nov 30
1
Inconsistency in treating NaN-results?
As a side note, Splus makes sin(x) NA, with a warning, for
abs(x)>1.6*2^48 (about
4.51e+14) because more than half the digits are incorrect in sin(x)
for such x. E.g.,
in R we get:
> options(digits=16)
> library(Rmpfr)
> sin(4.6e14)
[1] -0.792253849684354
> sin(mpfr(4.6e14, precBits=500))
1 'mpfr' number of precision 500 bits
[1]
2015 Apr 30
2
R CMD check and missing imports from base packages
On Wed, Apr 29, 2015 at 8:12 PM, Paul Gilbert <pgilbert902 at gmail.com> wrote:
>
> As I recall, several packages mask the simulate generic in stats, if you
> are looking for examples.
>
FWIW, here is a list of base* functions masked** by CRAN packages:
https://github.com/gaborcsardi/rfunctions/blob/master/rfunctions.md
Look at the long table in the end. simulate indeed comes up
2019 May 30
2
Converting non-32-bit integers from python to R to use bit64: reticulate
Thank you Gabriel for valuable insights on the 64-bit integers topic.
In addition, my statement was wrong, as Python3 seems to have unlimited
(and variable) size integers. Here is related CPython Code:
https://github.com/python/cpython/blob/master/Objects/longobject.c
Division between Int-32 and Int-64 seems to only happen in Python2.
Best,
Juan
El mi?rcoles, 29 de mayo de 2019, Gabriel
2019 Jun 23
2
Calculation of e^{z^2/2} for a normal deviate z
I agree with many the sentiments about the wisdom of computing very
small p-values (although the example below may win some kind of a prize:
I've seen people talking about p-values of the order of 10^(-2000), but
never 10^(-(10^8)) !). That said, there are a several tricks for
getting more reasonable sums of very small probabilities. The first is
to scale the p-values by dividing the
2023 Feb 20
1
uniroot violates bounds?
Le 18/02/2023 ? 21:44, J C Nash a ?crit?:
> I wrote first cut at unirootR for Martin M and he revised and put in
> Rmpfr.
>
> The following extends Ben's example, but adds the unirootR with trace
> output.
>
> c1 <- 4469.822
> c2 <- 572.3413
> f <- function(x) { c1/x - c2/(1-x) }; uniroot(f, c(1e-6, 1))
> uniroot(f, c(1e-6, 1))
> library(Rmpfr)
>
2012 Jul 07
1
creating a '[' method for an S4 class
Hi,
I'm working on an S4 class that is expected to behave like an array.
I have some difficulties when defining '[' and I wonder if someone
could point me to the right direction:
1) Call the S4 object "obj"
2) Assume dim(obj) = c(10, 4, 2)
3) Suppose someone calls: obj[1:3,] , which is a mistake, given
dim(obj); how do I detect such situations?
Thank you very much for
2019 Jun 04
0
Converting non-32-bit integers from python to R to use bit64: reticulate
>>>>> Juan Telleria Ruiz de Aguirre
>>>>> on Mon, 3 Jun 2019 06:50:17 +0200 writes:
> Thank you Martin for giving to know and developing 'Rmpfr' library for
> unlimited size integers (GNU C GMP) and arbitrary precision floats (GNU C
> MPFR):
> https://cran.r-project.org/package=Rmpfr
> My question is: In the long term
2016 Aug 15
2
ifelse() woes ... can we agree on a ifelse2() ?
On Fri, Aug 12, 2016 at 11:31 AM, Hadley Wickham <h.wickham at gmail.com> wrote:
>> >> One possibility would also be to consider a "numbers-only" or
>> >> rather "same type"-only {e.g., would also work for characters}
>> >> version.
>>
>> > I don't know what you mean by these.
>>
>> In the