similar to: args / formals on primitives

Displaying 20 results from an estimated 5000 matches similar to: "args / formals on primitives"

2007 Feb 01
0
Fwd: Re: read.spss and encodings
--- John Kane <jrkrideau at yahoo.ca> wrote: > Date: Thu, 1 Feb 2007 09:07:11 -0500 (EST) > From: John Kane <jrkrideau at yahoo.ca> > Subject: Re: [R] read.spss and encodings > To: Thomas Friedrichsmeier > <thomas.friedrichsmeier at ruhr-uni-bochum.de> > > Hi Thomas, > > I am using R 2.4.1 on WindowsXP and I don't seem to > be > having any
2020 May 24
0
Fwd: RKWard and R 4.0.0 - Important bug and workaround
Dear all, as I am providing rkward backports for Debian testing and stable on CRAN, I am forwarding this notice by the main developer. Meanwhile, it has been communicated that R 4.0.1 will be released on June 6. Cheers, Johannes ---------- Weitergeleitete Nachricht ---------- Betreff: RKWard and R 4.0.0 - Important bug and workaround Datum: Sonntag, 24. Mai 2020, 10:14:17 CEST Von:
2018 Oct 07
1
Warning when calling formals() for `[`.
Hello, This is because args(`[`) returns NULL and class(NULL) is NULL. So the question would be why is the return value of args(`[`) NULL? Rui Barradas ?s 15:14 de 07/10/2018, Peter Dalgaard escreveu: > > >> On 7 Oct 2018, at 16:04 , Rui Barradas <ruipbarradas at sapo.pt> wrote: >> >> Hello, >> >> I don't see why you say that the documentation
2020 May 24
1
Surpising behavior when using an active binding as loop index in R 4.0.0
A shorter reproducible example: example(makeActiveBinding) for (fred in 1:3) { 0 } ls() Both problems go away if you first do compiler::enableJIT(2) So looks like a bug in compiling the for loop. -Deepayan On Sat, May 23, 2020 at 5:45 PM Thomas Friedrichsmeier via R-devel <r-devel at r-project.org> wrote: > > Possibly just a symptom of the earlier behavior, but I'll amend my
2007 Jul 11
1
Getting param names of primitives
Hi, In the latest R this does not work anymore args <- formals(log) because log is primitive. Is there any other way to get the argument list? I just need the name of the parameter to display some error message about it. I have looked at args() but I can't find anything to extract the argument names from it. Thanks, M. Manese
2018 Oct 06
1
Warning when calling formals() for `[`.
Hi, Thanks for the note. How would explain the following snippet taken from `formals` doc page (the code comment is also from that doc) ? ## formals returns NULL for primitive functions. Use it in combination with ## args for this case. is.primitive(`+`) formals(`+`) formals(args(`+`)) Le sam. 6 oct. 2018 ? 13:42, Rui Barradas <ruipbarradas at sapo.pt> a ?crit :
2007 Jan 17
2
R_ParseVector API change
Dear R developers, just a quick question: I noted that R_ParseVector () has gained an additional parameter (since SVN rev. 39999). Since R_ParseVector () is part of the public API, I'm wondering, whether this API change was intentional or not. Either way is fine with me, but in order to make sure the next release of RKWard will be compilable with R 2.5.0, I'd like to make sure,
2007 Mar 29
1
small bug in ansari.test
The help page for ansari.test() says (emphasis added): By default (if exact is not specified), an exact p-value is computed if both samples contain less than 50 finite values **and there are no ties**. Otherwise, a normal approximation is used. However, this does not appear to be the case in R 2.4.1 or R 2.5.0. In fact, even example(ansari.test) produces a warning Warning message:
2018 Oct 06
5
Warning when calling formals() for `[`.
Hi, A short code example showing the warning might the only thing needed here: ``` > formals(args(`[`)) NULL *Warning message:In formals(fun) : argument is not a function* > is.function(`[`) [1] TRUE > is.primitive(`[`) [1] TRUE ``` Now with an other primitive: ``` > formals(args(`sum`)) $... $na.rm [1] FALSE > is.function(`sum`) [1] TRUE > is.primitive(`sum`) [1] TRUE
2006 Nov 07
2
Crash when embedding R X11 windows
Dear R developers, I've been experimenting with embedding R X11 windows into another application using KDE's QXEmbed on linux. Attempting to do so will crash R (with R 2.4.0, trunk, and I know the bug has been around in prior versions). I used to think this was related to bug #848, but I'm not sure, if / how the solution suggested there still applies to current versions of R.
2006 Apr 10
2
install.packages on unix / su (PR#8760)
Full_Name: Thomas Friedrichsmeier Version: R 2.2.1 OS: Debian / Linux Submission from: (NULL) (84.60.123.243) Wishlist item: There is a small problem using intall.packages() (and update.packages()): Typically I want to install packages for system-wide use, not in a user directory. Obviously this does not work without superuser rights. What I would like to be able to do is to specify a
2006 Oct 06
1
operator :: and symbols not in the namespace of a package with a namespace (PR#9279)
Full_Name: Thomas Friedrichsmeier Version: 2.4.0 OS: GNU/Linux Submission from: (NULL) (84.61.116.51) Since R 2.4.0, operator "::" also returns objects in the package environment, if the package does not have a namespace. This is a very welcome addition. Additional wish: If a package has a namespace, but does not place all symbols in that namespace, lookup will still fail. For example
2018 Oct 07
4
Warning when calling formals() for `[`.
Hello, I don't see why you say that the documentation seems to be wrong: class(args(`+`)) #[1] "function" args() on a primitive does return a closure. At least in this case it does. Rui Barradas ?s 14:05 de 07/10/2018, Peter Dalgaard escreveu: > There is more "fun" afoot here, but I don't recall what the point may be: > >> args(get("+"))
2007 Feb 01
2
read.spss and encodings
Hi! I'm having trouble with importing spss files containing non-ascii characters (R 2.4.1, debian linux, i386). To reproduce: Download the following file: http://statmath.wu-wien.ac.at/data/spss/de/comphomeneu.sav require (foreign) Sys.setlocale (locale="C") read.spss("comphomeneu.sav")$ARBEIT[1] # prints: # [1] im B\374ro # Levels: im B\374ro zuhause \374 of course
2007 Mar 01
1
Default par() options
The following question/idea came up on the RKWard development mailing list, but might be of general interest: Is there a nice way to customize the default look of all graphs on all devices? I.e. a way to - for instance - set the following options before each plot: par(bg="light gray", las=2, pch=19) As far as I have found, there would currently be two ways to do this: 1) Adding the
2003 Oct 10
1
incorrect behaviour of formals (PR#4511)
Full_Name: Jörg Polzehl Version: 1.8.0 OS: Windows XP Submission from: (NULL) (62.141.176.1) I encountered a problem when playing with the mle library and specifying negative starting values for the parameters. The reason seems to be an incorrect behaviour of function formals: glike<-function(a=1,b=1,c=1) a > formals(glike) $a [1] 1 $b [1] 1 $c [1] 1 > unlist(formals(glike)) a b c
2007 Jun 26
1
slight anomaly in formals<- ? (PR#9758)
Hi, The R input/output after the following paragraph is from a session with version.string R version 2.4.0 Patched (2006-11-23 r39958). The last element, x$c, of x has no value and after the assignment of x to the formals of f, x$c does not become a formal argument of f. The second assignment does the job. It seems that x$c actually becomes the body of f after the first assignment. There is no
2016 Mar 13
1
formals(x)<- drops attributes including class
Just checking in to see whether it is intended or not that assigning new formals to a function/closure causes any attributes to be dropped: EXAMPLE: > fcn <- structure(function() {}, foo="foo", class=c("foo")) > str(fcn) function () - attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 18 1 30 18 30 1 1 .. ..- attr(*, "srcfile")=Classes
1999 Mar 29
3
problems with formals and get (PR#151)
With 0.63.3, try test <- function(){ fn <- function(a) print("hello") print(is.function(fn)) print(names(formals("fn")))} test() if fn is not quoted in the last line of test, it works properly. test <- function(){ fn <- function() print("hello") formals(fn) <- alist(a=,b=) return(fn)} formals(test()) now try with line 3 of test changed to
2006 Oct 13
2
bug: Editing function formals deletes the environment
First, here's the specific bug I have. Later I'll say why I care. > ls(zappo) Error in try(name) : object "zappo" not found # good. > f = function(zappo) { function(y) zappo + y } > g = f(1) > g(1) [1] 2 > formals(g) $y > formals(g)$y > formals(g)$y = 2 > g function (y = 2) zappo + y > g(1) Error in g(1) : object "zappo" not found