similar to: Extract.data.frame.Rd about $.data.frame

Displaying 20 results from an estimated 10000 matches similar to: "Extract.data.frame.Rd about $.data.frame"

2019 Feb 10
1
Extract.data.frame.Rd about $.data.frame
In R devel, data.frame method of '$' has been removed, but this part of "Details" section of Extract.data.frame.Rd still implies existence of the method. The \code{data.frame} method for \code{$}, treats \code{x} as a list, except that (as of R-3.1.0) partial matching of \code{name} to the names of \code{x} will generate a warning; this may become an error in future
2012 Nov 16
1
Help page on '$': 'warnPartialMatchAttr' should be 'warnPartialMatchDollar'
http://stackoverflow.com/questions/6065724/assigning-value-to-a-variable-that-has-a-dot-in-the-name made me realize this. The context is 'a' is assigned to ret$log.id, but then ret$log returns "a" and ret$l also returns "a". There is a comment from Charles on the question: "Also see options(warnPartialMatchDollar=T) if you want to track these." But, in
2017 Nov 04
1
ans[nas] <- NA in 'ifelse' (was: ifelse() woes ... can we agree on a ifelse2() ?)
Removal of ans[nas] <- NA from the code of function 'ifelse' in R is not committed (yet). Why? -------------------------------------------- On Mon, 28/11/16, Martin Maechler <maechler at stat.math.ethz.ch> wrote: Subject: Re: [Rd] ifelse() woes ... can we agree on a ifelse2() ? Cc: R-devel at r-project.org, maechler at stat.math.ethz.ch Date: Monday, 28 November, 2016, 10:00
2016 Sep 26
2
Undocumented 'use.names' argument to c()
By "an argument named 'use.names' is included for concatenation", I meant something like this, that someone might try. > c(as.Date("2016-01-01"), use.names=FALSE) use.names "2016-01-01" "1970-01-01" See, 'use.names' is in the output. That's precisely because 'c.Date' doesn't have 'use.names', so
2018 Mar 24
1
Function 'factor' issues
I am trying once again. By just changing f <- match(xlevs[f], nlevs) to f <- match(xlevs, nlevs)[f] , function 'factor' in R devel could be made more consistent and back-compatible. Why not picking it? -------------------------------------------- On Sat, 25/11/17, Suharto Anggono Suharto Anggono <suharto_anggono at yahoo.com> wrote: Subject: Re: [Rd] Function
2017 Aug 18
1
Issues of R_pretty in src/appl/pretty.c
Examples similar to pretty(c(-1,1)*1e300, n = 1e9, min.n = 1) with smaller 'n': pretty(c(-1,1)*1e304, n = 1e5, min.n = 1) pretty(c(-1,1)*1e306, n = 1e3, min.n = 1) A report on 'pretty' when working with integers, similar to what led to change of 'seq' fuzz, is https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15137 -------------------------------------------- On Tue,
2017 Aug 19
1
Issues of R_pretty in src/appl/pretty.c
Yes, they work now. I mentioned them partly because the commit description said overflow for large n and partly to be considered for regression tests. -------------------------------------------- On Sat, 19/8/17, Martin Maechler <maechler at stat.math.ethz.ch> wrote: Subject: Re: [Rd] Issues of R_pretty in src/appl/pretty.c Cc: r-devel at r-project.org Date: Saturday, 19 August, 2017,
2019 Mar 05
2
stopifnot
Another possible shortcut definition: assert <- function(exprs) do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) After thinking again, I propose to use ??? ? ? stop(simpleError(msg, call = if(p <- sys.parent()) sys.call(p))) - It seems that the call is the call of the frame where stopifnot(...) is evaluated. Because that is the correct context, I
2017 May 19
1
stopifnot() does not stop at first non-TRUE argument
While you are fiddling with stopifnot(), please consider changing the form of the error thrown so that it includes the caller's call. The change would be from something like stop( <<the message>> ) to stop(simpleError( <<the message>>, sys.call(-1))) For the following code f <- function(x, y) { stopifnot(x > y) x - y } g <- function(x,
2017 May 18
2
stopifnot() does not stop at first non-TRUE argument
>From an example in http://www.uni-muenster.de/ZIV.BennoSueselbeck/s-html/helpfiles/nargs.html , number of arguments in '...' can be obtained by (function(...)nargs())(...) . I now realize that sys.call() doesn't expand '...' when the function is called with '...'. It just returns the call as is. If 'stopifnot' uses sys.call() instead of match.call() , the
2016 Aug 14
2
table(exclude = NULL) always includes NA
useNA <- if (missing(useNA) && !missing(exclude) && !(NA %in% exclude)) "ifany" An example where it change 'table' result for non-factor input, from https://stat.ethz.ch/pipermail/r-help/2005-April/069053.html : x <- c(1,2,3,3,NA) table(as.integer(x), exclude=NaN) I bring the example up, in case that the change in result is not intended.
2016 Sep 13
1
R-intro: function 'stderr' and 'sd'
While you are editing that, you might change its name from 'stderr' to standardError (or standard_error, etc.) so as not to conflict with base::stderr(). Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Sep 13, 2016 at 8:55 AM, Martin Maechler <maechler at stat.math.ethz.ch > wrote: > >>>>> Suharto Anggono Suharto Anggono via R-devel <r-devel at
2015 Oct 22
1
(no subject)
------------------ >>>>> Henric Winell <[hidden email]> >>>>> on Wed, 21 Oct 2015 13:43:02 +0200 writes: > Den 2015-10-21 kl. 07:24, skrev Suharto Anggono Suharto Anggono via R-devel: >> Marius Hofert-4------------------------------ >>> Den 2015-10-09 kl. 12:14, skrev Martin Maechler: >>> I think so: the code above
2016 Aug 15
1
table(exclude = NULL) always includes NA
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Mon, 15 Aug 2016 11:07:43 +0200 writes: >>>>> Suharto Anggono Suharto Anggono <suharto_anggono at yahoo.com> >>>>> on Sun, 14 Aug 2016 03:42:08 +0000 writes: >> useNA <- if (missing(useNA) && !missing(exclude) && !(NA %in%
2019 Nov 18
2
Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
>>>>> Martin Maechler >>>>> on Mon, 18 Nov 2019 12:15:38 +0100 writes: >>>>> suharto anggono--- via R-devel >>>>> on Sun, 17 Nov 2019 10:34:31 +0000 writes: >> SVN revision 77401 changes >> x[isM] <- lapply(x[isM], function(o) `class<-`(o, class(o)[class(o) != "AsIs"])) >> to
2017 Jun 14
1
[bug] droplevels() also drop object attributes (comment…)
In R devel r72789, the added part in 'factor' documentation (factor.Rd) is the following. Undocumentedly for a long time, \code{factor(x)} loses all \code{\link{attributes}(x)} but \code{"names"}, and resets \code{"levels"} and \code{"class"}. In the code of function 'factor', names(x) is copied to the result. As I mentioned before, names(x) is _not_
2019 Apr 01
1
[External] Re: stopifnot -- eval(*) inside for()
On Mon, 1 Apr 2019, Martin Maechler wrote: >>>>>> Suharto Anggono Suharto Anggono via R-devel >>>>>> on Sun, 31 Mar 2019 15:26:13 +0000 writes: > > > Ah, with R 3.5.0 or R 3.4.2, but not with R 3.3.1, 'eval' > > inside 'for' makes compiled version behave like > > non-compiled version. > > Ah.. ... thank
2017 Feb 01
1
RFC: tapply(*, ..., init.value = NA)
On 'aggregate data.frame', the URL should be https://stat.ethz.ch/pipermail/r-help/2016-May/438631.html . vector(typeof(ans)) (or vector(storage.mode(ans))) has length zero and can be used to initialize array. Instead of if(missing(default)) , if(identical(default, NA)) could be used. The documentation could then say, for example: "If default = NA (the default), NA of appropriate
2018 Apr 29
1
Result of 'seq' doesn't use compact internal representation
Thanks -- I'll commit a fix after some testing. Best, luke On 04/29/2018 06:22 AM, Duncan Murdoch wrote: > On 28/04/2018 11:11 PM, Suharto Anggono Suharto Anggono via R-devel wrote: >>> .Internal(inspect(1:10)) >> @300e4e8 13 INTSXP g0c0 [NAM(3)]? 1 : 10 (compact) >>> .Internal(inspect(seq(1,10))) >> @3b6e1f8 13 INTSXP g0c4 [] (len=10, tl=0) 1,2,3,4,5,...
2019 Mar 31
3
stopifnot
Ah, with R 3.5.0 or R 3.4.2, but not with R 3.3.1, 'eval' inside 'for' makes compiled version behave like non-compiled version. options(error = expression(NULL)) library(compiler) enableJIT(0) f <- function(x) for (i in 1) {x; eval(expression(i))} f(is.numeric(y)) # Error: object 'y' not found fc <- cmpfun(f) fc(is.numeric(y)) # Error: object 'y' not found