search for: 9cfc3219c4b89649313bfe6853d87894

Displaying 4 results from an estimated 4 matches for "9cfc3219c4b89649313bfe6853d87894".

2016 Nov 15
0
ifelse() woes ... can we agree on a ifelse2() ?
...quot;Date", <dateTime> (i.e. "POSIXct" and "POSIXlt"), factors, and "mpfr" (the arbitrary-precision numbers in my package "Rmpfr") Also if you are not on github, you can quickly get to the ifelse2() definition : https://gist.github.com/mmaechler/9cfc3219c4b89649313bfe6853d87894#file-ifelse-def-r-L168 > Also, if you're considering an improved ifelse(), I'd > strongly urge you to consider adding an `na` argument, I now did (called it 'NA.'). > so that you can use ifelse() to transform all three > possible values in a logical ve...
2016 Aug 15
2
ifelse() woes ... can we agree on a ifelse2() ?
On Fri, Aug 12, 2016 at 11:31 AM, Hadley Wickham <h.wickham at gmail.com> wrote: >> >> One possibility would also be to consider a "numbers-only" or >> >> rather "same type"-only {e.g., would also work for characters} >> >> version. >> >> > I don't know what you mean by these. >> >> In the
2016 Nov 28
0
ifelse() woes ... can we agree on a ifelse2() ?
...y needs the R-forge version of Matrix, version 1.2-8. A bit less than an hour ago, I have updated the gist with an updated proposal ifelse2() {and the current alternatives that I know}, modified so it *does* keep more, e.g. dim() attributes in reasonable cases. https://gist.github.com/mmaechler/9cfc3219c4b89649313bfe6853d87894#file-ifelse-def-r-L168 Hence my ifelse2() became even a bit longer (but not slower) working for even more classes of "yes" and "no". > On ifelse-checks.R: > * In function 'chkIfelse', if the fourth function argument names is not "NA.", the arg...
2016 Nov 26
3
ifelse() woes ... can we agree on a ifelse2() ?
Just stating, in 'ifelse', 'test' is not recycled. As I said in "R-intro: length of 'ifelse' result" (https://stat.ethz.ch/pipermail/r-devel/2016-September/073136.html), ifelse(condition, a, b) returns a vector of the length of 'condition', even if 'a' or 'b' is longer. On current 'ifelse' code in R: * The part ans[nas] <- NA