Re: [R] OSX-specific Bug in randomForest

2024-10-24 Thread Stevie Pederson
ple Silicon specific, not OSX per se: > >> sum(rep(1 / 9, 9)) - 1 > pd> [1] 0 > > >> On 23 Oct 2024, at 07:26 , Stevie Pederson > >> wrote: > >> > >> sum(rep(1 / 9, 9)) - 1 # [1] 2.220446e-16 > > But indeed, it *is*

[R] OSX-specific Bug in randomForest

2024-10-22 Thread Stevie Pederson
Hi, It appears there is an OSX-specific bug in the function `randomForest.default()` Going by the source code at https://github.com/cran/randomForest/blob/master/R/randomForest.default.R the bug is on line 103 If the vector `cutoff` is formed using `cutoff <- rep(1/9, 9)` (line #101) the test on

Re: [R] Exceptional slowness with read.csv

2024-04-08 Thread Stevie Pederson
Hi Dave, That's rather frustrating. I've found vroom (from the package vroom) to be helpful with large files like this. Does the following give you any better luck? vroom(file_name, delim = ",", skip = 2459465, n_max = 5) Of course, when you know you've got errors & the files are big like that

Re: [R] How to import an excel data file

2023-09-23 Thread Stevie Pederson
Hi David, If you're using RStudio, I'd encourage the use of R Projects, with a new project for each analysis, even if you only do one every few years. That would also correspond to a new directory for each analysis, which many also find helpful. The package 'here' [install.packages("here")] then u

Re: [R] grDevices::hcl.colors using two colours: Bug or Feature?

2023-04-28 Thread Stevie Pederson
- 1), length.out = n2) > > > > I think n2 == 1L is not the right condition and we need to distinguish n > > = 1 and n = 2. > > > > Will have a closer look... > > > > Thanks for reporting this! > > Achim > > > > On Fri, 28 Apr 2023, Rui Barradas wrot

[R] grDevices::hcl.colors using two colours: Bug or Feature?

2023-04-28 Thread Stevie Pederson
Hi, I'm not sure if this is a bug or a feature, but after updating to Rv4.3, if requesting two colours from hcl.colors() you now get the same colour twice. This occurs for all palettes I've tried. My reprex: hcl.colors(2, "Vik") [1] "#F1F1F1" "#F1F1F1" As I have multiple workflows I run repeated