The other problem in this example is setting NA's.
replace(x, x == 0, NA)
requires two instances of x making it not very pipe friendly. In
dplyr there is na_if
to address that problem and base R might have something that addresses this
so we don't have to define our own zero2na as the base of
> Gabor Grothendieck
> on Mon, 16 Sep 2024 11:21:55 -0400 writes:
> Suppose we have `dat` shown below and we want to find the the `y` value
> corresponding to the last value in `x` equal to the corresponding
component
> of `seek` and we wish to return an output the same l
> On Mar 6, 2020, at 9:17 AM, brodie gaslam via R-devel
> wrote:
>
>> On Friday, March 6, 2020, 8:56:54 AM EST, Martin Maechler
>> wrote:
>
>> Note that the * -> LaTex -> PDF rendered version looks a bitnicer.
>
> Ah yes, that does indeed look quite a bit nicer.
>
>> I wrote the functio
> On Friday, March 6, 2020, 8:56:54 AM EST, Martin Maechler
> wrote:
> Note that the * -> LaTex -> PDF rendered version looks a bitnicer.
Ah yes, that does indeed look quite a bit nicer.
> I wrote the function and that help page originally.
And thank you for doing so. It is a wonderful fu
> brodie gaslam via R-devel
> on Thu, 5 Mar 2020 22:18:33 + (UTC) writes:
> I've found over time that R documentation that comes off as terse at
> first blush is usually revealed to be precise, concise, and complete
> on close reading. I'm sure this is also true of `?
Trying the attachment as .txt instead of Rd.
On Thursday, March 5, 2020, 5:20:25 PM EST, brodie gaslam via R-devel
wrote:
% File src/library/base/man/findInterval.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2020 R Core Team
% Distributed under GPL 2 or later
\name
> William Dunlap via R-devel
> on Thu, 4 Aug 2016 15:20:57 -0700 writes:
> What should findInterval(x,vec,all.inside=TRUE) return when
length(vec)<=1,
> so there are no inside intervals?
> R-3.3.0 gives a decreasing map of x->output when length(vec)==1 and -1's
> whe