search for: sym_inherits

Displaying 4 results from an estimated 4 matches for "sym_inherits".

2019 Nov 01
3
R C api for 'inherits' S3 and S4 objects
...String(klass = getAttrib(x, R_ClassSymbol))) { for (int i=0; i<LENGTH(klass); i++) { if (STRING_ELT(klass, i) == char_) return true; } } return false; } // S4 inheritance bool Rinherits(SEXP x, SEXP char_) { SEXP vec = PROTECT(ScalarString(char_)); SEXP call = PROTECT(lang3(sym_inherits, x, vec)); bool ans = LOGICAL(eval(call, R_GlobalEnv))[0]==1; UNPROTECT(2); return ans; }
2019 Nov 01
4
[External] R C api for 'inherits' S3 and S4 objects
...i++) { > > if (STRING_ELT(klass, i) == char_) return true; > > } > > } > > return false; > > } > > // S4 inheritance > > bool Rinherits(SEXP x, SEXP char_) { > > SEXP vec = PROTECT(ScalarString(char_)); > > SEXP call = PROTECT(lang3(sym_inherits, x, vec)); > > bool ans = LOGICAL(eval(call, R_GlobalEnv))[0]==1; > > UNPROTECT(2); > > return ans; > > } > > > > ______________________________________________ > > R-devel at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-d...
2019 Nov 01
0
[External] R C api for 'inherits' S3 and S4 objects
...) { > for (int i=0; i<LENGTH(klass); i++) { > if (STRING_ELT(klass, i) == char_) return true; > } > } > return false; > } > // S4 inheritance > bool Rinherits(SEXP x, SEXP char_) { > SEXP vec = PROTECT(ScalarString(char_)); > SEXP call = PROTECT(lang3(sym_inherits, x, vec)); > bool ans = LOGICAL(eval(call, R_GlobalEnv))[0]==1; > UNPROTECT(2); > return ans; > } > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Luke Tierney Ralph E. War...
2019 Nov 01
0
[External] R C api for 'inherits' S3 and S4 objects
...f (STRING_ELT(klass, i) == char_) return true; >>> } >>> } >>> return false; >>> } >>> // S4 inheritance >>> bool Rinherits(SEXP x, SEXP char_) { >>> SEXP vec = PROTECT(ScalarString(char_)); >>> SEXP call = PROTECT(lang3(sym_inherits, x, vec)); >>> bool ans = LOGICAL(eval(call, R_GlobalEnv))[0]==1; >>> UNPROTECT(2); >>> return ans; >>> } >>> >>> ______________________________________________ >>> R-devel at r-project.org mailing list >>> https://stat.ethz...