similar to: large factorials

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

2012 Apr 14
2
some questions about sympy (that is, rSymPy)
I am experimenting with rSymPy, and it seems to work nice. However, I dislike the need to wrap all sympy expressions within quotes, it leads to ugly calls like library(rSymPy) Var("x,y,z") sympy("(x+y)**2") and so on. Inspired by the function cq from mvbutiles package: library(mvbutils) > cq function (...) { as.character(sapply(as.list(match.call(expand.dots =
2009 May 05
8
limits
Hey, what is the R function for the mathematical limit ? e.g. to calculate and return the amount that the expression X^2 +X +2 approach as X approach 2 (X-> 2) thanks hassan [[alternative HTML version deleted]]
2013 Sep 12
1
problem with rJython and modules
Dear R People: I have been experimenting with rPython, rSymPy, and rJython. Here is my latest snag: > library(rJython) Loading required package: rJava Loading required package: rjson > library(rSymPy) > rJython <- rJython() > x <- "x" > y <- "y" > rJython$exec("from sympy import *") Error in .jcall("RJavaTools",
2009 Jul 28
1
Problem runnin rSymPy
Hi all, I'm having major difficulty using the rSymPy package this week, but I have used it without problems before now. Here is an example of what's happening: > library(rSymPy) Loading required package: rJava > sympy("var('a b c d')") Error in .jcheck() : No running detected. Maybe .jinit() would help. And I have no idea how to fix it. I Have tried re-installing
2009 May 05
1
yacas
Hi, as I find problems with yacas package... is there any R function equivalent to the yacas function "Factor" ? the factor function which i found in the R help is not the same. it doesn't factor an algebraic expression...... thanks hassan [[alternative HTML version deleted]]
2009 Jul 13
1
R in rearranging equations
Hi, can anyone tell me if R can be used to rearrange very complicated equations in terms of one of the variables? I have: dx/dt = a*b*m*y*(1-x)-r*x and, having set: dy/dx = 0, need to rearrange in terms of x. The problem I have is that I don't know how to rearrange equations when the variables are not yet defined (I get messages warning me that x etc can't be found). I'm not sure
2009 May 06
2
convert large integers to hex
Hi, I'm wondering if someone has solved the problem of converting very large integers to hex. I know about format.hexmode and as.hexmode, but these rely on integers. The numbers I'm working with are overflowing and losing precision. Here's an example: x <- "6595137340052185552" # stored as character as.integer(x) # warning about inaccurate conversion
2009 Jul 22
2
Automatic differentiation in R
Hi I recently gave a presentation about Automatic Differentiation (AD) and R at the Eighth Euro AD Workshop in Oxford (17/07/09). The presentation was intended as a general introduction to R and the desire for a generic AD interface for R. During the presentation I emphasised the need and the high level of interest that the R community has in developing such an interface and that input from the
2002 Jan 16
1
factorials
I'm a total newbie at using R, and so there probably is a better way to do this. However, I couldn't find one, and so maybe this will help someone. I was calculating log-likelihoods using a multinomial model, and found that for large n, prod(n:1) wouldn't work to calculate factorials (e.g., prod(200:1) = Inf). The below function calculates the natural log of a factorial (e.g.
2013 Nov 28
2
derivar una función
Las dos Enviado desde mi iPhone > El 28/11/2013, a las 18:07, "Carlos J. Gil Bellosta " <cgb en datanalytics.com> escribió: > > ¿Numérica o simbólicamente? > > Un saludo, > > Carlos J. Gil Bellosta > http://www.datanalytics.com > > El día 28 de noviembre de 2013 18:03, jmcontreras <jmcontreras en ugr.es> escribió: >> Hola a todos
2009 Apr 15
1
Automatic Differentiation for R
In efforts to improve optimization tools for R, one of my interests has been getting automatic differentiation capabilities so that analytic rather than numerical derivatives can be used. They would be helpful in several other areas besides optimization, My timings show factors of the order of 1000s in time improvements by avoiding numerical derivatives in some cases. There has been some work in
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)
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.
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]]
2011 Mar 04
1
Multi-line input to rsympy
Dear R users, I have been using rsympy to solve a set of simultaneous equations from R. There are two solutions for the variable I'm interested in, xx[0] and xx[1], which are in terms of symbols called lam and conc. I'd like to pick out the one which is positive at (lam=0, conc=0) and call it mysol. In python I could write: if (xx[0].subs(lam,0)).subs(conc,0)>0: mysol=xx[0]
2003 Nov 24
4
R postscript generation error (lines versus points) (PR#5285)
Full_Name: Stephen Harker Version: 1.80 OS: linux (Yellow Dog 3.0 on ppc) Submission from: (NULL) (130.194.13.101) In creating a postscript file from a set of data in which the points are plotted using `points()' and lines drawn using `lines()' I have found since upgrading from R version 1.4? to 1.8 that the two sets do not coinicide completely. This is best illustrated by a simple
2013 Sep 10
0
question about rSymPy and integration
Dear R Users: I would like to use symbolic integration from rSymPy and pass in the actual function. So I have > sympy("x=Symbol('x')") and if I use > sympy("integrate(cos(x),x)") it works fine. But what I want to do is something like > y <- "cos(x)" > sympy("integrate(y,x)") "cos(x)*x" Has anyone run into this, please?
2007 Sep 01
2
Comparing "transform" to "with"
Hi All, I've been successfully using the with function for analyses and the transform function for multiple transformations. Then I thought, why not use "with" for both? I ran into problems & couldn't figure them out from help files or books. So I created a simplified version of what I'm doing: rm( list=ls() ) x1<-c(1,3,3) x2<-c(3,2,1) x3<-c(2,5,2)
2004 Jun 29
2
Calculate correctly, but gives an error message
Hi! I will calculate sum??s in the following way: E.g.: a <- rpois(100,20) b <- rpois(100,5) x <- data.frame(cbind(a,b)) # the sum??s should be calculated based on a. attach(x) sort.nace <- unique(sort(x[,1])) sum1 <- matrix(ncol=1, nrow=length(sort.nace)) # I calculate the sum of all values of b, which have the same category in a. Eg.: sum1[1,] <- sum(subset(x,
2008 Apr 22
4
how to convert non numeric data into numeric?
I am having the following error in my function function(theta,reqdIRR) { theta1<-theta[1] theta2<-theta[2] n<-length(reqdIRR) constant<- n*(theta1+theta2) sum1<-lapply(reqdIRR*exp(theta1),FUN = sum) sum2<-lapply(exp(theta2 - reqdIRR*exp(theta1)),FUN = sum) sum = sum1 + sum2 log.fcn = constant - as.numeric(sum) result = - log.fcn return(result) } *error :