Displaying 8 results from an estimated 8 matches for "is_s4_object".
2006 Sep 03
1
Internal flag for S4 objects
A recent revision (svn version 39077) has introduced an internal flag (a
bit in the C structure) that is turned on by the code that generates
objects from an S4 class.
There are corresponding tests for an S4 object, isS4() in R and
IS_S4_OBJECT() in C. These are fast and reliable, and should replace
any heuristic tests previously used.
The tests are not currently used widely, but in the future could be
combined with some of the other recent changes to improve reliability
and efficiency of computations with S4 objects. Most such chan...
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
2010 Feb 18
3
R CMD check: OK in LINUX. Crashes in Windows!
Hi,
I have followed the recommended steps for creating a package (rctest). As of
now, my goal is simply to understand how various pieces fit together. The
package includes:
(1) C code with source in sub-directories, compiled to create a static
library.
(a) There is a single C-struct (dns) a simple 'matrix': {int m; int n;
double *d;}
(b) C code to create random matrix of a certain size.
2016 Jan 05
2
For integer vectors, `as(x, "numeric")` has no effect.
...;offending' bit of R_set_class (the C-code implementing the
R function `class<-`), which treats an INTSXP in the same way as a
REALSXP, breaking before it get coerced to REALSXP:
else if(!strcmp("numeric", valueString)) {
setAttrib(obj, R_ClassSymbol, R_NilValue);
if(IS_S4_OBJECT(obj)) /* NULL class is only valid for S3 objects */
do_unsetS4(obj, value);
switch(TYPEOF(obj)) {
case INTSXP: case REALSXP: break;
default: PROTECT(obj = coerceVector(obj, REALSXP));
nProtect++;
}
}
Simply deleting "case INTSXP: " will let integer...
2007 Oct 03
1
R-2.6.0 is released
...dering quotes in
titles in HTML, and \sQuote and \dQuote into text on Windows.
C-LEVEL FACILITIES
o New utility function alloc3DArray similar to allocMatrix.
o The entry point R_seemsS4Object in Rinternals.h has not been
needed since R 2.4.0 and has been removed. Use IS_S4_OBJECT
instead.
o Applications embedding R can use R_getEmbeddingDllInfo() to
obtain DllInfo for registering symbols present in the
application itself.
o The instructions for making and using standalone libRmath have
been moved to the R Installation and Admini...
2007 Oct 03
1
R-2.6.0 is released
...dering quotes in
titles in HTML, and \sQuote and \dQuote into text on Windows.
C-LEVEL FACILITIES
o New utility function alloc3DArray similar to allocMatrix.
o The entry point R_seemsS4Object in Rinternals.h has not been
needed since R 2.4.0 and has been removed. Use IS_S4_OBJECT
instead.
o Applications embedding R can use R_getEmbeddingDllInfo() to
obtain DllInfo for registering symbols present in the
application itself.
o The instructions for making and using standalone libRmath have
been moved to the R Installation and Admini...
2006 Oct 03
1
R-2.4.0 is released
...as been completely revised to use cached
generic functions and to search for the best match among
inherited methods. See ?Methods and
http://developer.r-project.org/howMethodsWork.pdf
o Objects created from an S4 class are now marked by an internal flag,
tested by isS4() in R and by macro IS_S4_OBJECT() in C. This
is an efficient and reliable test, and should replace all
earlier heuristic tests.
o Some changes have been made to automatic printing of S4
objects, to make this correspond to a call to show(), as per
'Programming with Data'.
o S4 generic and class definitions a...
2006 Oct 03
1
R-2.4.0 is released
...as been completely revised to use cached
generic functions and to search for the best match among
inherited methods. See ?Methods and
http://developer.r-project.org/howMethodsWork.pdf
o Objects created from an S4 class are now marked by an internal flag,
tested by isS4() in R and by macro IS_S4_OBJECT() in C. This
is an efficient and reliable test, and should replace all
earlier heuristic tests.
o Some changes have been made to automatic printing of S4
objects, to make this correspond to a call to show(), as per
'Programming with Data'.
o S4 generic and class definitions a...