search for: new_general

Displaying 7 results from an estimated 7 matches for "new_general".

Did you mean: netgeneral
2023 Mar 08
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
That's an interesting example, as it's conceptually similar to what Pavel is proposing, but structurally different. gsubfn() is more complicated than a simple switch in the body of the function, and wouldn't work well as an anonymous function. Multiple dispatch can nicely encompass both of these cases. For replace(), library(S7) replace <- new_generic("replace",
2005 Dec 16
3
Help with error
...hod_missing'' ./script/../config/../app/controllers/admin_controller.rb:65:in `add_to_project'' The following code: application.rb -------------- private def get_project session[:project_in_progress] ||= Project.new end project_controller.rb --------------------- def new_general @project = get_project @general = GeneralItem.new @general_tab = "current" end # Get the current Project session and # add the current Object to it def add_to_project @project = get_project @project.find(params[:id]) redirect_to(:action => new_license)...
2023 Mar 07
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
This could be extended to sub and gsub as well which gsubfn in the gusbfn package already does: library(gsubfn) gsubfn("^..", toupper, c("abc", "xyz")) ## [1] "ABc" "XYz" On Fri, Mar 3, 2023 at 7:22?PM Pavel Krivitsky <p.krivitsky at unsw.edu.au> wrote: > > Dear All, > > Currently, list= in base::replace(x, list, value)
2024 Mar 14
1
Spurious warning in as.data.frame.factor()
On Thu, 14 Mar 2024 10:41:54 +0100 Martin Maechler <maechler at stat.math.ethz.ch> wrote: > Anybody trying S7 examples and see if they work w/o producing > wrong warnings? It looks like this is not applicable to S7. If I overwrite as.data.frame with a newly created S7 generic, it fails to dispatch on existing S3 classes: new_generic('as.data.frame', 'x')(factor(1)) #
2024 Mar 15
2
Spurious warning in as.data.frame.factor()
>>>>> Ivan Krylov >>>>> on Thu, 14 Mar 2024 14:17:38 +0300 writes: > On Thu, 14 Mar 2024 10:41:54 +0100 > Martin Maechler <maechler at stat.math.ethz.ch> wrote: >> Anybody trying S7 examples and see if they work w/o producing >> wrong warnings? > It looks like this is not applicable to S7. If I overwrite >
2024 Mar 15
1
Spurious warning in as.data.frame.factor()
>>>>> Martin Maechler >>>>> on Fri, 15 Mar 2024 11:24:22 +0100 writes: >>>>> Ivan Krylov >>>>> on Thu, 14 Mar 2024 14:17:38 +0300 writes: >> On Thu, 14 Mar 2024 10:41:54 +0100 >> Martin Maechler <maechler at stat.math.ethz.ch> wrote: >>> Anybody trying S7 examples and see if they work
2024 Mar 14
1
Spurious warning in as.data.frame.factor()
> ? Tue, 12 Mar 2024 12:33:17 -0700 > Herv? Pag?s <hpages.on.github at gmail.com> ?????: > > The acrobatics that as.data.frame.factor() is going thru in order to > > recognize a direct call don't play nice if as.data.frame() is an S4 > > generic: > > ??? df <- as.data.frame(factor(11:12)) > > > > ???