search for: do_math2

Displaying 10 results from an estimated 10 matches for "do_math2".

1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the order of the arguments. This is an example: > rpois(n=1,lambda=2) [1] 3 > rpois(lambda=2,n=1) [1] 2 0 It obviously uses the first argument as the number of samples to be drawn, which is wrong. I used Version 0.49 Beta (April 23, 1997). Fredrik
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the order of the arguments. This is an example: > rpois(n=1,lambda=2) [1] 3 > rpois(lambda=2,n=1) [1] 2 0 It obviously uses the first argument as the number of samples to be drawn, which is wrong. I used Version 0.49 Beta (April 23, 1997). Fredrik
1997 Jun 25
3
R-alpha: lbeta, ctrl-C and crashes
1. lbeta and beta do not work properly: lbeta returns its first argument and beta gives the lbeta result. In names.c lines 245-6, the codes for these should be 2 and 3 instead of 1 and 2 2. crtl-C does not work (except the first time) on Red Hat elf Linux (which has many many other problems as well) nor on the previous version of Linux for Amiga. It worked on Slackware aout Linux and now works
1997 Jun 25
3
R-alpha: lbeta, ctrl-C and crashes
1. lbeta and beta do not work properly: lbeta returns its first argument and beta gives the lbeta result. In names.c lines 245-6, the codes for these should be 2 and 3 instead of 1 and 2 2. crtl-C does not work (except the first time) on Red Hat elf Linux (which has many many other problems as well) nor on the previous version of Linux for Amiga. It worked on Slackware aout Linux and now works
2006 Jan 17
1
how can i locate the source code of a module quickly?
I have dowloaded the Source Code of R,and I want to know the process of chi-sqared test,but how can I found it? [[alternative HTML version deleted]]
2020 May 22
0
round() and signif() do not check argument names when a single argument is given
...er a missing x value message or an unused argument if it is a user function; the second would trigger a warning about missing x. Compare to: > log(base=3) Error: argument "x" is missing, with no default These two functions are handled in a handler function in src/main/arithmetic.c: do_Math2(). The strange cases get handled by the code around line 1655 in src/main/arithmetic.c. The context is n is the number of arguments, but symbol names have not yet been checked: if(n == 1) { double digits = 0.0; if(PRIMVAL(op) == 10004) digits = 6.0; SETCDR(args, CONS(ScalarReal(digits),...
2017 Jan 03
1
.Internal for functions in distn.R
...nctions in distn.R were converted from .Internal to .External ([1], in 2012), and to .Call ([2], in 2014). They are still listed as .Internal in names.c, although they are not used in that way. Shouldn?t they be removed? There?s quite some simplification to be had, e.g., do_math3 could go away and do_math2 would be simpler. If that makes sense (I may be missing something?), I?d be happy to create a patch that does this. Best, Lukas [1] https://github.com/wch/r-source/commit/e430853d37cda69505e7452ddceb06a2008821d2 <https://github.com/wch/r-source/commit/e430853d37cda69505e7452ddceb06a2008821d2...
1997 May 05
0
R-beta: R 0.49 -- "funny" bug: beta(.) gives lbeta(.); lbeta(a,b) gives a
...eta(.) and lbeta(.) doesn't call either one. The bug has already been in 0.50--"pre 3", but is not in 16.1. It must have been caused by the addition of all the complex stuff. I've looked in src/main/names.c and arithmetic.c and couldn't see any 'code' error {do_math2(..) code / math2() switch statement} =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subj...
2003 Jan 17
1
Arguments of R- and C-side of internal functions
Dear R experts, I looked at the body of, say, `optim' function and found the call to the `.Internal', C optim function. It looks like this: .Internal(optim(par, fn1, gr1, method, con, lower, upper)) On the other hand, the C prototype of optim is: SEXP do_optim(SEXP call, SEXP op, SEXP args, SEXP rho); So, I guess that all the list of parameters passing in R are assigned to
2011 Nov 18
2
round() ignores missing arguments if it is used inside another function where some arguments are missing.
I have stumbled across some behaviour in R that I really can't place, and that makes coding a bit tricky. I know that I can work around it when explicitly checking for missing arguments, but still... I have two functions. I have a first function based on paste ? ? fun1 <- function(x,y){ ? ? ? print(missing(y)) ? ? ? paste(x,'X',sep=y) ? ? } If I try this function without