similar to: factorials

Displaying 20 results from an estimated 6000 matches similar to: "factorials"

2009 Apr 22
5
large factorials
I am working on a project that requires me to do very large factorial evaluations. On R the built in factorial function and the one I created both are not able to do factorials over 170. The first gives an error and mine return Inf. Is there a way to have R do these larger calculations (the calculator in accessories can do 10000 factorial and Maple can do even larger) -- View this message in
2000 Apr 25
2
Recursive Computation in R
Hi there, I have written a function to calculate factorials as follows: fact <- function(x) { recurse <- x > 1 x[!recurse] <- 1 if( any(recurse) ) { y <- x[recurse] x[recurse] <- y * fact( y - 1 ) } x } I want to be able to do the famous birthday problem, which will involve the computation of 365!, however it shall get cancelled
2000 Jul 06
1
factorial(), modulus()
Dear R friends, I was wondering if there were factorial and modulus functions out there that I've somehow overlooked? -P. -- Peter L. Hurd, Ph.D. phurd at uts.cc.utexas.edu http://www.zo.utexas.edu/research/phurd fax 512.471-3878 Section of Integrative Biology, University of Texas, Austin TX 78712 USA
2008 Sep 28
5
birthday problem (factorial limit)
Hi, I tried to calculate the formula for the birthday problem (the probability that at least two people out of a group of n people share the same birthday) But the factorial-function allows me only to calculate factorials up to 170. So is there a way to push that limit? to solve this formula: (factorial(365) / factorial((365-23))) / (365^23) (n=23)
2001 Dec 04
3
factorial() not here (PR#1194)
Version 1.3.1 (2001-08-31) factorial() is not in R. It is in S-Plus with the definition factorial <- function(n) gamma(n + 1) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not
2011 Nov 18
3
Permutations
Hi all, why factorial(150) shows the error out of range in 'gammafn'? I have to calculate the number of subset formed by 150 samples taking 10 at a time. How is this possible? best [[alternative HTML version deleted]]
1999 Jun 23
4
does a factorial function exist
I've looked through the documentation with R-0.64.1 and have been unable to find a high-level function for evaluation of factorials (i.e., n!, not factorial designs). Is there such a function? It is trivial to code, so everyone could write their own, but it also would be worthwhile as a standard tool. I'm guessing I am just overlooking it.
2012 Mar 24
1
Solving the equation using uniroot
Hello all, I was going to solve (n-m)! * (n-k)! = 0.5 *n! * (n-m-k)! for m when values of n and k are provided n1<-c(10,13,18,30,60,100,500)         # values of n kx<-seq(1,7,1);                               # values of k slv2<-lapply(n1,function(n){    slv1<-lapply(kx,function(k){              lhs<-function(m)              {                
2008 Apr 28
5
Fractional Factorial Design
Hi all, Does anybody know if it is possible to build a fractional factorial design in R? That is, suppose that we want do design an experiment with 3 factors with 2, 3 and 3 levels, respectivly. However we want to consider, let's say, only 6 from all possible level combinations. Does R design such experiment? Thanks in advance, Caio [[alternative HTML version deleted]]
2009 Nov 02
1
need help in using Hessian matrix
Hi I need to find the Hessian matrix for a complicated function from a certain kind of data but i keep getting this error Error in f1 - f2 : non-numeric argument to binary operator the data is given by U<-runif(n) Us<-sort(U) tau1<- 2 F1tau<- pgamma((tau1/theta1),shape,1) N1<-sum(Us<F1tau) X1<- Us[1:N1]
2005 Apr 04
1
Handling very large integers with factorial and combinat (nCm)
Dear list, perhpas this question is more suitable for R-dev but since I am not really a developer I post it here first. Apparently the following lines do not create any problem in R: library(combinat) r <- 20; b <- 2; sum( sapply(0:r,function(x) nCm(r,x)^(2*b)) ) > 2^64 while in C I obtain an overflow of data even using unsigned long long and with long double I incurr in precision
2003 Dec 26
2
OC curve in "Quality Control"
Dear all, Can anyone please help me about any of the following questions: -------------------------------------------- 1. How can i find "factorial" of any number in R? I tried > prod(170:1) # to find factorial of 170 or 170! Is it the only procedure - or R has any better process / operational character to calculate factorial? Also, is it possible to calculate factorial of 500? Or
2001 Nov 13
1
rarefaction variance
Here's a question for ecologists on the r-help list-- I'm addressing this to ecologists in particular because they're most likely to be familiar with the equation in question but I'll be happy to discuss the problem with anyone who's willing to take a whack at it. I'm trying to write a function to calculate the large sample variance of species richness estimates by
2003 Jun 15
0
Summary: Factorial function in R
Thanks to Martin, Marc, Dennis, Rashid and Bill for comment. The short answer is there is no factorial function within the base package, so use the result that gamm(x + 1) = x!. This what the factorial() function in the package gregmisc does: factorial <- function (x) gamma(1 + x) Bill V. also writes: "Your best move is usually to use the lgamma() function (for log gamma) and do
2010 Jul 05
2
Function to compute the multinomial beta function?
Dear R-users, Is there an R function to compute the multinomial beta function? That is, the normalizing constant that arises in a Dirichlet distribution. For example, with three parameters the beta function is Beta(n1,n2,n2) = Gamma(n1)*Gamma(n2)*Gamma(n3)/Gamma(n1+n2+n3) Thanks in advance for any assisstance. Regards, Greg [[alternative HTML version deleted]]
2003 Jan 22
1
negative multinomial regression models
Hello, I''ve spent a lot of time during the past month trying to get negative multinomial regression models for clustered event counts as described in (Guang Guo. 1996. "Negative Multinomial Regression Models For Clustered Event Counts." Sociological Methodology 26: 113-132., abstract at http://depts.washington.edu/socmeth2/4abst96.htm) implemented in R. A FORTRAN version of the
2003 Feb 14
2
factorial function
Sorry for the stupid question, but is there the factorial function in R? I tried to find it using help.search('factorial') but got nothing appropriate. Many thanks, -Serge
2004 Nov 08
4
About 'choose' function
Hello R-users, When I didn't know about the internal 'choose' function, I made such function, 'my.choose' below. But when I used them instead of choose(6000,20), they didn't give me any answer. What is the difference between 'choose', 'my.choose1', and 'my.choose2' below? That is, what is behind 'choose' function and what's the problem
2011 Nov 29
2
Non parametric, repeated-measures, factorial ANOVA
Hi I have data from an experiment that used a repeated-measures factorial 2x2 design (i.e. each participant contributed data to both levels of both factors). I need a non-parametric version of the repeated-measures factorial ANOVA to analyse the data. SPSS only has non-parametric tests for one-way ANOVAs but I have been told that the test I need can be implemented using the R software.
2006 Aug 18
2
4^2 factorial help
To whom it may concern: I am trying a factorial design a system of mine that has two factors. Each factor was set at four different levels, with one replication for each of the combinations. My data is as follows: A B Response 1 600 2.5 0.0257 2 600 2.5 0.0254 3 600 5