similar to: WishList: Remove Generic Arguments

Displaying 20 results from an estimated 10000 matches similar to: "WishList: Remove Generic Arguments"

2018 Aug 09
0
WishList: Remove Generic Arguments
On 09/08/2018 5:45 PM, Abs Spurdle wrote: > I apologize if this issue has been raised before. > > I really like object oriented S3 programming. > However, there's one feature of object oriented S3 programming that I don't > like. > Generic functions can have arguments other than dots. > > Lets say you have an R package with something like: > >
2005 Aug 29
9
can a class find out it''s instance name?
Hi friends - a javascript question.... Does the prototype object add some way for a class to find out the variable name of its instance variable? Or does javascript have some built in way to do this? This is confusing to describe - but if I define a variable as some object: var myVariable= new Widget(''fdfa''); can some built-in method inside the Widget class be
2007 Dec 10
4
Reading through a group of .RData files
Hi. I have a procedure that reads a directory, loops through a set of particular .RData files, loading each one, and feeding its object(s) into a function, as follows: cvListFiles<-list.files(fnDir); for(i in grep(paste("^",pfnStub,".*\\.RData$",sep=""),cvListFiles)){ load(paste(fnDir,cvListFiles[i],sep="/")); myFunction(rliObject); rm(rliObject); };
2018 Oct 15
2
sys.call() inside replacement functions incorrectly returns *tmp*
Kia Ora > Although I'm not sure what problem it would solve... Given that you asked, I was interested in writing a multiple assignment function as a replacement function, so something like: massign (x, y, z) = construct.some list () Obviously, that's not possible. Probably the best example I can think of is converting cartesian coordinates to polar coordinates. Then we might have
2006 Feb 08
29
Autocomplete and Firefox
Having problems with the autocomplete on my linux box and firefox. When I use form tags it breaks, without form tags everything works fine. Exact copy of the example provided, but I added form tags.. The initial search and select works but then the box sort of "locks up" and I can''t change it at all, If I do try to type something nothing changes but a second later the whole
2006 May 02
5
How to call a javascript function from rails view?
Is there a way to call a javascript function from within a rails view? I can''t use the onLoad javascript method inside the <body> tag because I don''t have control over the body tag, it''s in my header. There are several rss feed reading functions that are in the page and I would like to call those functions while the page is being loaded or once it''s
2009 Jan 02
1
"registering" a generic method for a class
Sorry in advance if this is too simple a question, but I'm stuck with some odd behavior and I can't find the text to rid myself of this (admittedly somewhat trivial) problem. Note that I've done generic programming with S3 "objects" in the past, but I've never really dabbled in creating S4 objects until now. So, I've created a new S4 class, call it
2005 Dec 07
1
Dots argument in apply method
Hello everyone, I'm working on a package using S4 classes and methods and I ran into the following "problem" when I tried to create an "apply" method for objects of one of my new classes. I've found a way around the problem but I wonder if I did not paint myself into the corner. I'd like your opinion about that. So I have an object "myObj" of class
2019 Aug 15
3
Underscores in package names
Martin, Thank you for discussing this amongst R-core and for detailing the R-core discussion here. Some specific examples where having underscores available would have been useful. 1. My primerTree package (2013) was originally primer_tree, but I had to change the name to camelCase to comply with the check requirements. Using camelCase in the package name makes reading code jarring, as the
2019 Mar 27
2
Discrepancy between is.list() and is(x, "list")
> the prison made by ancient design choices That prison of ancient design choices isn't so bad. I have no further comments on object oriented semantics. However, I'm planning to follow the following design pattern. If I set the class of an object, I will append the new class to the existing class. #good class (object) = c ("something", class (object) ) #bad class (object)
2019 Mar 29
1
Discrepancy between is.list() and is(x, "list")
I know I said that I had no further comments on object oriented semantics. However, I found a contradiction in the R documentation. Gabriel Becker wrote: > So, there are implicit classes, but *only when the data object is NOT an "R object" In the R Language Definition: > The R specific function typeof returns the type of an R object. > Lists have elements, each of which can
2005 Jun 02
1
showMethods doubt
Hi, I'm developing in S4 and I wanted to see the methods for a specific class using showMethods but I didn't succed. Can someone help ? See the example below. setClass("myclass", representation( name ="character" ) ) setGeneric("mymeth", function(obj, ...){ standardGeneric("mymeth") } ) setMethod("mymeth",
2019 Mar 26
3
bugs in head() and tail()
(Using R 3.5.3). I found bugs in head() and tail(). The following works: > f = function () 1 > head (f) 1 function () 2 1 However, the following does not: > class (f) = "f" > head (f) Error in x[seq_len(n)] : object of type 'closure' is not subsettable [[alternative HTML version deleted]]
2019 Jul 02
3
Format printing inside a matrix
Hi everyone, I am not sure if there is an existing solution to this, but I want my S4 objects inside a list matrix showing correctly. Currently it shows as: R> str(lst[[1]]) Formal class 'Basic' [package "symengine"] with 1 slot ..@ ptr:<externalptr> R> matrix(lst, 2) [,1] [,2] [,3] [,4] [,5] [1,] ? ? ? ? ? [2,] ? ? ? ? ? Is it
2017 Nov 11
1
effects package x axis labels
Dear All, probably a simple enough solution but don;t seem to be able to get my head around it...example based on a publicly available data set: mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv") mylogit <- glm(admit ~ gre + gpa + rank, data = mydata, family = "binomial") library(effects) plot(allEffects(mylogit) ? ?
2019 Mar 26
4
Discrepancy between is.list() and is(x, "list")
If I can merge this thread with the one I started yesterday... > "If the object does not have a class attribute, it has an implicit class..." > which I take to mean that if an object does have a class attribute it does not also have an implicit class. > I think this is reasonable behavior. Consider the "Date" class, which stores values as "numeric": >
2006 Jun 14
5
generic onDragStart onDrag and onDragFinish events extracted from scriptaculous?
Hi folks. I''m working on a project where I need some drag and drop, but I need to implement what happens in a very different way, so I''m creating my own class for it. I don''t want to reinvent the wheel and redo Thomas'' excellent drag/drop functionality, nor do I want to copy/paste his code over into mine. So, I was wondering, has anyone tried to extract
2016 Apr 14
2
Previously extended schema not working in 4.4.0
On Thu, 2016-04-14 at 18:07 +0100, Jonathan Hunter wrote: > On 14 April 2016 at 13:37, Jonathan Hunter <jmhunter1 at gmail.com> > wrote: > > > # samba-tool dbcheck --cross-ncs > > Checking 4079 objects > > MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk: 0x00290001 > > MYOBJ=value,OU=myou,DC=mydomain,DC=org,DC=uk: 0x0029000a > >
2006 Mar 11
2
how do i retrieve a newly created id
in my code i''m calling save on an object. The id gets created as the object is persisted. How can i retrieve that newly created id? I guess I could query the table again using the other attributes of the object but is there another way? thanks in advance. larry -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Mar 02
2
Wishlist: Make screeplot() a generic (PR#9541)
Full_Name: Gavin Simpson Version: 2.5.0 OS: Linux (FC5) Submission from: (NULL) (128.40.33.76) Screeplots are a common plot-type used to interpret the results of various ordination methods and other techniques. A number of packages include ordination techniques not included in a standard R installation. screeplot() works for princomp and prcomp objects, but not for these other techniques as it