Displaying 20 results from an estimated 1000 matches similar to: "pbirthday() for larger number of classes"
2005 May 04
1
Problem with pbirthday (PR#7837)
Full_Name: Andy Lynch
Version: 1.9.1
OS: Windows
Submission from: (NULL) (131.111.86.211)
As I understand it, pbirthday(n,c,k) gives the approximate probability that we
see a class with k coicident people in it when n people are sorted into c
classes.
so the command
> pbirthday(4,classes=3,coincident=4)
should give the approximate probability that when four people fall into three
2006 Jan 23
1
proposed pbirthday fix
Recent news articles concerning an article from The Lancet with fabricated
data indicate
that in the sample containing some 900 or so patients, more than 200 had
the same
birthday. I was curious and tried out the p and q birthday functions but
pbirthday
could not handle 250 coincidences with n = 1000. The calculation of upper
prior
to using uniroot produces NaN,
upper<-min(n^k/(c^(k-1)),1)
2004 Jun 21
2
Cross build Makefile
Hello,
I am trying to use Yan and Rossini's Makefile for cross building Windows
versions of R packages in Linux with R 1.9.0. When compiling R with the
mingw tools I get an error about expm1 being undeclared when first found
at src/main/arithmetic.c:1019
If I fiddle a bit with it later on I also get errors about log1p bein
undeclared.
Any idea what should I look for?
I am using R 1.9.0 in
2004 Jun 21
2
Cross build Makefile
Hello,
I am trying to use Yan and Rossini's Makefile for cross building Windows
versions of R packages in Linux with R 1.9.0. When compiling R with the
mingw tools I get an error about expm1 being undeclared when first found
at src/main/arithmetic.c:1019
If I fiddle a bit with it later on I also get errors about log1p bein
undeclared.
Any idea what should I look for?
I am using R 1.9.0 in
2002 Feb 28
4
pexp.c (PR#1335)
Full_Name: M Welinder
Version: 1.4
OS: (src)
Submission from: (NULL) (192.5.35.38)
It seems to me that pexp can be improved in the lower_tail=TRUE and log_p=FALSE
case by using expm1. Something like
-expm1 (-x / scale);
I think.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2017 Feb 17
1
Wish List: Extensions to the derivatives table
The issue is that without an extensible derivative table or the proposed extensions, it is not possible to automatically produce (without manual modification of the deriv3 output) a function that avoids catastrophic cancellation regardless of the working range.
Manual modification is not onerous as a one-time exercise, but can be time consuming when it must be done numerous times, for example
2017 Feb 17
4
Wish List: Extensions to the derivatives table
The derivative table resides in the function D. In S+ that table is extensible because it is written in the S language. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p,
2013 Nov 09
1
typo in help page for log1p
There is a small typo in the Source section of the help page
for log1p:
Source:
'log1p' and 'expm1' may be taken from the operating system, but if
not available there are based on the Fortran subroutine 'dlnrel'
there -> they
Jen
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8
2004 Jun 27
1
cross-compiling + expm1
Hello all,
Just joined this mailing list -- not sure if this is the right list to
send this question, but I have a question about cross-compiling R. I am
working with R-1.9.1.tgz.
It may just be with my version of mingw32, but it seems that expm1 is
not defined, so I tried to ensure that HAVE_EXPM1 was #undef'ed before
cross-compiling. The problem is that, in <include/Rmath.h> if
2010 May 05
1
testInstalledBasic question
Hi,
I'm currently in the process of writing an R-installation SOP for my
company. As part of that process I'm using the recommendations from the 'R
Installation and Administration' document, section 3.2, "Testing an
installation". This is done on an XP machine, using the latest binary of
2.11.0.
The binary is downloaded and then installed from the installer. I then
2009 Apr 27
0
Patch proposal for logspace_sub
G'day all,
I am working on problems where I have to calculate the logarithm of a
sum or difference from the logarithms of the individual terms; so the
functions logspace_add and logspace_sub which are part of R's API come
in handy.
However, I noticed that logspace_sub can have problems if both
arguments are (very) small or the difference between the arguments are
vary small. The logic
2005 Aug 11
1
include C functions from nmath in my own C functions
Hi:
I followed the README in src/nmath/standalone/
to make the use the command "make shared" to make the
libRmath.so file. I also add the directories containg
libRmath.so to LD_LIBRARY_PATH by using command
"export
D_LIBRARY_PATH=$LD_LIBRARY_PATH:$/home/zhliu/Backup/R-2.0.1/src/nmath/standalon
e
"
However, when I try to run the following codes by the
command
2013 Nov 07
1
R interface to C API Rf_logspace_{add,sub}?
Is there an R-language interface to the R API C-language functions Rf_logspace_add()
and Rf_logspace_sub()? I don't see one but I may not looking under the
right name.
Various packages have functions which do that same sort
of thing (log(exp(x)+exp(y)) and log(exp(x)-exp(y)) without unnecessary
floating point errors). They have names like
matrixStats::logSumExp(lx, na.rm=FALSE, ...)
2005 Aug 11
1
include C functions from nmath in my own C functions
Hi:
I followed the README in src/nmath/standalone/
to make the use the command "make shared" to make the
libRmath.so file. I also add the directories containg
libRmath.so to LD_LIBRARY_PATH by using command
"export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$/home/zhliu/Backup/R-2.0.1/src/nmath/standalon
e
"
However, when I try to run the following codes.
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
On a recent FreeBSD 8.0-CURRENT (i386) building R (any version) breaks
with the following messages:
----------------------------------------------------------------------
[...snip...]
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c wilcox.c -o wilcox.o
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include
2003 Aug 25
1
Re: R 1.7.x and inaccurate log1p() on OpenBSD 3.2 and NetBSD 1.6 (PR#3979)
>> I have come across your reported log1p error (#2837) on a NetBSD (1.6W)
>> system.
I've just made further experiments on the deficient log1p() function
on OpenBSD 3.2 and NetBSD 1.6 with this test program:
% cat bug-log1p.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int
main(int argc, char* argv[])
{
int k;
double x;
for (k = 0; k
2004 Oct 22
3
pgamma discontinuity (PR#7307)
Full_Name: Morten Welinder
Version: 2
OS: Solaris/space/gcc2.95.2
Submission from: (NULL) (65.213.85.217)
I changed src/nmath/standalone/test.c to read:
---------------------------------------------------------------------------------
#define MATHLIB_STANDALONE 1
#include <Rmath.h>
#include <stdio.h>
int
main()
{
double x;
for (x = 99990; x <= 100009; x++)
printf
2009 May 21
4
Product of 1 - probabilities
I am having a slight problem with probabilities.
To calculate the final probability of an event p(F), we can take the product of the chance that each independent event that makes p(F) will NOT occur.
So...
p(F) = 1- ( (1-p(A)) * (1-p(B)) * (1-p(C))...(1-p(x)) )
If the chance of an event within the product occurring remains the same, we can therefore raise this probability to a power of the
2017 Feb 17
0
Wish List: Extensions to the derivatives table
Hi.
Unless I'm misremembering, log, exp, sin, cos, and tan are all handled in
deriv3. The functions listed are specially coded slightly more accurate
versions but can be substituted with native ones for which deriv/deriv3
will work automatically. I believe that if you write your functions using
log(a + 1) instead of log1p(a) or log(x) / log(2) instead of log2(x) deriv3
will work fine.
2007 May 23
2
Possible ld.exe problem when building
Dear R People:
I am trying to build R-2.5.0 from source on a Windows machinee.
I downloaded the tools and such, and started things off.
I received some odd errors messages, looked on the R Search
and found a similar problem. The suggestion was to re-load
"ld.exe".
I downloaded and installed everything again. Same problem.
I am including my output.