search for: set_attrib

Displaying 7 results from an estimated 7 matches for "set_attrib".

Did you mean: get_attrib
2020 Nov 21
3
Two ALTREP questions
...x, "dim") <- c(2L,3L);x})) .Internal(inspect({x <- 1:6;attributes(x)<- list(dim = c(2L,3L));x})) ``` The only way to make an ALTREP matrix is to use the C level function ``` attachAttrib <- inline::cxxfunction( signature(x = "SEXP", attr = "SEXP" ) , ' SET_ATTRIB(x,attr); return(R_NilValue); ') x <- 1:6 attachAttrib(x, pairlist(dim = c(2L, 3L))) .Internal(inspect(x)) ``` Since the matrix, or adding attributes, is a common need for the object operation, I wonder if this missing feature is intended? This also brings my second question, it seems like t...
2008 Jun 03
1
Error/Crash on start up of R (Ubuntu and Wine within Ubuntu)
...detail soon) persisted. I then tried using WINE to run R using the Windows version of R. The same error was presented. The Ubuntu and WINE errors are slightly different but are more or less the same... COMMON ASPECT--I get the following: Error in load(name, envir = .GlobalEnv): value of 'SET_ATTRIB' must be a pairlist or NULL, not a 'double' WINE Variant--I get a windowed box with the title "Information" noting that "Fatal error: unable to restore saved data in .RData". UBUNTU Variant--I get a segmentation fault statement and abort options. I'm going to...
2009 Oct 01
2
creating environments in package's C code
Dear developers, is it possible to create environments in C code of packages? Simply using SEXP env; PROTECT (env = allocSExp(ENVSXP)); and assigning the enclosing environment with SET_ENCLOS seems to be insufficient. Best wishes, Martin -- Dr. Martin Becker Statistics and Econometrics Saarland University Campus C3 1, Room 206 66123 Saarbruecken Germany
2020 Nov 21
0
[External] Two ALTREP questions
...my second question, it seems like the ALTREP coercion function does not > handle attributes correctly. After the coercion, the ALTREP object will > lose its attributes. > ``` > coerceFunc <- inline::cxxfunction( signature(x = "SEXP", attr = "SEXP" ) , ' > SET_ATTRIB(x,attr); > return(Rf_coerceVector(x, REALSXP)); > ') >> coerceFunc(1:6, pairlist(dim = c(2L, 3L))) > [1] 1 2 3 4 5 6 >> coerceFunc(1:6 + 0L, pairlist(dim = c(2L, 3L))) > [,1] [,2] [,3] > [1,] 1 3 5 > [2,] 2 4 6 > ``` > The problem is tha...
2024 May 13
1
[External] R hang/bug with circular references and promises
On Mon, 13 May 2024 09:54:27 -0500 (CDT) luke-tierney--- via R-devel <r-devel at r-project.org> wrote: > Looks like I added that warning 22 years ago, so that should be enough > notice :-). I'll look into removing it now. Dear Luke, I've got a somewhat niche use case: as a way of protecting myself against rogue *.rds files and vulnerabilities in the C code, I've been
2010 Sep 08
0
Correction to vec-subset speed patch
...r52822, but seems unnecessary as long as callers ignore + any R_UseNamesSymbol attribute when not subscripting with strings, + and the subscript will not be modified in a replacement operation + that it is supplying the subscripts for. */ PROTECT(s = duplicate(s)); SET_ATTRIB(s, R_NilValue); SET_OBJECT(s, 0); +#else + /* Duplicate if the subscript might be being used to replace elements of + itself. */ + if (used_to_replace && NAMED(s) > 0) + s = duplicate(s); + PROTECT(s); +#endif + switch (TYPEOF(s)) { case NILSXP: *s...
2010 May 02
2
samba4 make error - drsblobs.so
...t;CHECK_UNIX_NAME" is not used torture/smb2/dir.c:509:1: warning: macro "CHECK_STR" is not used torture/smb2/dir.c:478:1: warning: macro "CHECK_TIME" is not used Compiling torture/smb2/lease.c Compiling torture/smb2/create.c torture/smb2/create.c:116:1: warning: macro "SET_ATTRIB" is not used torture/smb2/create.c:59:1: warning: macro "CHECK_TIME" is not used Compiling torture/smb2/acls.c torture/smb2/acls.c: In function ?test_owner_bits?: torture/smb2/acls.c:670: warning: unused variable ?has_take_ownership_privilege? torture/smb2/acls.c:669: warning: unused...