Re: [Rd] as.Date without "origin"

2022-11-02 Thread Johannes Rauh
Dear all, I would throw in my vote to have origin = "1970-01-01" as a default in as.Date(). Why? Well, in fact, the "converse" function as.numeric() does have an implicit default: > as.numeric(Sys.Date()) [1] 19298 In fact, as.numeric seems to not even have a method for class "Date", and so

Re: [Rd] S3 weirdness

2021-06-25 Thread Johannes Rauh
Good morning, I would argue that in this specific simple example, R does the less confusing thing from a user's perspective (maybe not from a programmer's or philosopher's perspective): When using a function from a package that has not been loaded before and when this package creates an

Re: [Rd] `basename` and `dirname` change the encoding to "UTF-8"

2020-06-30 Thread Johannes Rauh
, let's see what happens. Cheers Johannes > Gesendet: Dienstag, 30. Juni 2020 um 09:25 Uhr > Von: "Tomas Kalibera" > An: "Johannes Rauh" , "r-devel" > Betreff: Re: [Rd] `basename` and `dirname` change the encoding to "UTF-8" > > On 6

[Rd] `basename` and `dirname` change the encoding to "UTF-8"

2020-06-29 Thread Johannes Rauh
Dear R Developers, I noticed that `basename` and `dirname` always return "UTF-8" on Windows (tested with R-4.0.0 and R-3.6.3): > p <- "Föö/Bär" > Encoding(p) [1] "latin1" > Encoding(dirname(p)) [1] "UTF-8" > Encoding(basename(p)) [1] "UTF-8" Is this on purpose? At least I did not find any

[Rd] In base R: argument `list` does not accept lists

2018-04-13 Thread Johannes Rauh
The function `base::rm` has an argument that is named `list`. However, if a list is passed as `list` to `rm` (e.g.: `rm(list = list("x", "y"))`), an error is raised: "invalid first argument". Agreed, the documentation says that `list` should be "a character vector naming objects to be