Re: [R] Creating methods

2023-04-24 Thread Göran Broström
Den 2023-04-24 kl. 15:14, skrev Ivan Krylov: В Mon, 24 Apr 2023 15:07:50 +0200 Göran Broström пишет: First, you should only ever write a method if you own the generic or the class. I was stunned when I read it. I write methods all over the place for generics like print, summary, plot, etc.

Re: [R] Creating methods

2023-04-24 Thread Ivan Krylov
В Mon, 24 Apr 2023 15:07:50 +0200 Göran Broström пишет: >> First, you should only ever write a method if you own the generic >> or the class. > I was stunned when I read it. I write methods all over the place for > generics like print, summary, plot, etc. You most likely do that for your own

[R] Creating methods

2023-04-24 Thread Göran Broström
I am reading Hadley's "Advanced R", Section 13.4.3 (https://adv-r.hadley.nz/s3.html). It starts There are two wrinkles to be aware of when you create a new method: First, you should only ever write a method if you own the