Displaying 7 results from an estimated 7 matches for "ifelse1".
Did you mean:
ifelse
2008 Feb 21
3
applying a function to data frame columns
useR's,
I want to apply this function to the columns of a data frame:
u[u >= range(v)[1] & u <= range(v)[2]]
where u is the n column data frame under consideration and v is a data frame
of values with the same number of columns as u. For example,
v1 <- c(1,2,3)
v2 <- c(3,4,5)
v3 <- c(2,3,4)
v <- as.data.frame(cbind(v1,v2,v3))
uk1 <- seq(min(v1) - .5, max(v1) + .5,
2016 Aug 06
4
ifelse() woes ... can we agree on a ifelse2() ?
...quot;mpfr"),
function(x,i,value) .........)
but that currently fails as the C-low-level dispatch for '[<-'
does not look at the full signature
]]
I vaguely remember having seen proposals for
light weight substitutes for ifelse(), called
ifelse1() or
ifelse2() etc...
and I wonder if we should not try to see if there was a version
that could go into "base R" (maybe the 'utils' package, not
'base'; that's not so important).
One difference to ifelse() would be that the type/mode/class of...
2008 Jul 01
1
[.data.frame speedup
Below is a version of [.data.frame that is faster
for subscripting rows of large data frames; it avoids calling
duplicated(rows)
if there is no need to check for duplicate row names, when:
i is logical
attr(x, "dup.row.names") is not NULL (S+ compatibility)
i is numeric and negative
i is strictly increasing
"[.data.frame" <-
function (x, i, j,
2008 Aug 18
2
ifelse
I find it slightly surprising, that
ifelse(TRUE, character(0), "")
returns NA instead of character(0).
[WNT 2.6.2 Patched]
--
Heikki Kaskelma
2016 Aug 06
0
ifelse() woes ... can we agree on a ifelse2() ?
...function(x,i,value) .........)
>
> but that currently fails as the C-low-level dispatch for '[<-'
> does not look at the full signature
> ]]
>
> I vaguely remember having seen proposals for
> light weight substitutes for ifelse(), called
> ifelse1() or
> ifelse2() etc...
>
> and I wonder if we should not try to see if there was a version
> that could go into "base R" (maybe the 'utils' package, not
> 'base'; that's not so important).
>
> One difference to ifelse() woul...
2016 Aug 07
1
ifelse() woes ... can we agree on a ifelse2() ?
....)
>>
>> but that currently fails as the C-low-level dispatch for '[<-'
>> does not look at the full signature
>> ]]
>>
>> I vaguely remember having seen proposals for
>> light weight substitutes for ifelse(), called
>> ifelse1() or
>> ifelse2() etc...
>>
>> and I wonder if we should not try to see if there was a version
>> that could go into "base R" (maybe the 'utils' package, not
>> 'base'; that's not so important).
>>
>...
2016 Aug 12
2
ifelse() woes ... can we agree on a ifelse2() ?
...;
>> but that currently fails as the C-low-level dispatch for '[<-'
>> does not look at the full signature
>> ]]
>>
>> I vaguely remember having seen proposals for
>> light weight substitutes for ifelse(), called
>> ifelse1() or
>> ifelse2() etc...
>>
>> and I wonder if we should not try to see if there was a version
>> that could go into "base R" (maybe the 'utils' package, not
>> 'base'; that's not so important).
>>
>&...