search for: _inherits_

Displaying 8 results from an estimated 8 matches for "_inherits_".

2019 Oct 31
2
head.matrix can return 1000s of columns -- limit to n or add new argument?
Hmm, the problem I see here is that these implied classes are all inherently one-off. We also have > inherits(matrix(1,1,1),"numeric") [1] FALSE > is.numeric(matrix(1,1,1)) [1] TRUE > inherits(1L,"numeric") [1] FALSE > is.numeric(1L) [1] TRUE and if we start fixing one, we might need to fix all. For method dispatch, we do have inheritance, e.g. >
2005 Oct 31
2
Help with try or tryCatch
I am having trouble with try and tryCatch. I have read the documentation but I just don't get it. Here is what I am trying to do. I am testing a function which has a number of parameters. I want to test it for different values of the parameters and I have some loops, in the middle of which is a test of the function. Sometimes the routine fails and so I have put the bit that might fail
2019 Mar 27
0
Discrepancy between is.list() and is(x, "list")
...I was still correct for the cases under discussion. From ?UseMethod (emphasis mine) An R object is a data object which has a ?class? attribute (and this can be tested by ?is.object?). A class attribute is a character vector giving the names of the classes from which the object _inherits_. *If the object does not have a class attribute,* * it has an implicit class.* Matrices and arrays have class ?"matrix"? or?"array"? followed by the class of the underlying vector. Most vectors have class the result of ?mode(x)?, except that integer vec...
2019 Nov 01
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
...> Details: > > 1. Here, we describe the so called ?S3? classes (and methods). For > ?S4? classes (and methods), see ?Formal classes? below. > > 2. Many R objects have a class attribute, a character vector giving > the names of the classes from which the object _inherits_. > (Functions oldClass and oldClass<- get and set the attribute, > which can also be done directly.) > > 3. If the object does not have a class attribute, it has an implicit > class, notably ?"matrix"?, ?"array"?, ?"function"? or ?&q...
2019 Nov 02
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
...e, we describe the so called ?S3? classes (and methods). For >> > ?S4? classes (and methods), see ?Formal classes? below. >> > >> > 2. Many R objects have a class attribute, a character vector giving >> > the names of the classes from which the object _inherits_. >> > (Functions oldClass and oldClass<- get and set the attribute, >> > which can also be done directly.) >> > >> > 3. If the object does not have a class attribute, it has an implicit >> > class, notably ?"matrix"?, ?&quot...
2019 Mar 27
2
Discrepancy between is.list() and is(x, "list")
> you had seemed to be presenting it as something new in 3.5.3. I would be surprised if the behavior doesn't go all the way back to whenever head.function was added. My bad. I'm just surprised I've never noticed these problems before. > S3 classes have no formal definitions at all > I'm not sure what is clear about that, or what class hierarchy you're talking about
2011 Jun 24
4
What does class "call" mean? How do I make class "formula" into a "call"?
I have a list called "tabs" that I would like to have the same structure as my list "eqSystem." The two look like they have the same format but they are different because when I look at their attributes, class(eqSystem[[1]]) is "call" but class(tabs[[1]]) is "formula". I want to have class(tabs[[1]]) as a call too. So what does "call" mean? And how
2019 Nov 02
6
head.matrix can return 1000s of columns -- limit to n or add new argument?
...t; > 1. Here, we describe the so called ?S3? classes (and methods). For > > ?S4? classes (and methods), see ?Formal classes? below. > > > > 2. Many R objects have a class attribute, a character vector giving > > the names of the classes from which the object _inherits_. > > (Functions oldClass and oldClass<- get and set the attribute, > > which can also be done directly.) > > > > 3. If the object does not have a class attribute, it has an implicit > > class, notably ?"matrix"?, ?"array"?, ?&quo...