Displaying 3 results from an estimated 3 matches for "printobject".
2005 May 10
1
Fwd: Re: Implementation of the names attribute of attribute lists
...cribed only after mailing it).
You wrote:
>Just to ask the obvious:
>
> Why is using str() not sufficient for you and instead,
> you use 'print.object' {not a good name, BTW, since it looks like a
> print() S3 method but isn't one} ?
Would printObject or printSEXP a better name?
>The very few cases I found it was insufficient,
>certainly dput() was, possibly even using it as
>dput(. , control = ....).
As I wrote in my email, I might have reinvented
the wheel. I did not know str! The output of
str and print.object is quite similar fo...
2008 Jul 20
1
garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not
..._R = allocVector(REALSXP, len_x));
Rprintf("Created 'x' at %p\n", x_R);
Rprintf(" (mode is %i, length is %i)\n", TYPEOF(x_R), LENGTH(x_R));
Rprintf(" (first element is %d)\n", REAL(x_R)[0]);
R_PreserveObject(x_R);
UNPROTECT(1);
return x_R;
}
void printObject(SEXP sexp)
{
Rprintf("object at %p\n", sexp);
Rprintf(" (mode is %i, length is %i, named is %i)\n",
TYPEOF(sexp), LENGTH(sexp), NAMED(sexp));
}
SEXP lostobject(SEXP n_R)
{
/*
* This function will:
* 1- create a numerical vector "x" and "preserve i...
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