similar to: Copy on assignment and .Internal(inspect())

Displaying 20 results from an estimated 600 matches similar to: "Copy on assignment and .Internal(inspect())"

2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All I have a problem with the height of the boxes in the key in the following. (The text is over 2 lines to accentuate the problem of no space between the rectangles.) Is there an easy way to put a space between the rectangles; size controls the width but there appears to be nothing for the height? xyplot(1~1, key = list(corner = c(0.8,0.8),
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
Hello, I was wondering if there were any plans for ALTREP lists (VECSXP)? It seems to me that they could be supported in a similar way to how ALTSTRING works, with Elt() and Set_elt() methods, or would there be some problems with that I?m not seeing due to lists not being atomic vectors? I was taking an approach of converting each list element (of a file-based list data structure) to an ALTREP
2008 Jan 30
6
Schedule parser
Hi, I was trying to schedule a worker to run during the midnight hour like this: :schedules: :collector: :process_something: :trigger_args: 30 * 0 * * 2,3,4,5,6 When I try to start backgroundrb, the "collector" worker failed to start up and I find this in backgroundrb_server.log: /home/mengkuan/apps/testrailsapp/current/vendor/plugins/backgroundrb/
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
Hi Kylie, Is it a list with only numerics in it? (I only see REALSXPs there, but obviously inspect isn't showing all of them). If so, you could load it up into one big vector and then also keep partitioning information around. Bioconductor does this (see ?IRanges::CompressedList ). The potential benefit here being that the underlying large vector could then be a big out-of-memory altrep. How
2007 Apr 04
1
Accessing C++ code from R
Hi, I am trying to use existing C++ code from R. I have no problems compiling C code and using it in R, but with C++ I'm running into problems. Here's the compiler output: Macintosh-10:~/Desktop/dissertation/Model - CPP version/R labguest$ g++ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 *.cpp In file included from
2013 Apr 01
2
Timing of SET_VECTOR_ELT
Assume a C program invoked by .Call, that returns a list. Near the top of the program we allocate space for all the list elements. (It is my habit to use "xyz2" for the name of the R object and "xyz" for the pointer to its contents.) PROTECT(means2 = allocVector(REALSXP, nvar)); means = REAL(means2); PROTECT(u2 = allocVector(REALSXP, nvar)); u =
2005 May 17
4
Combinations with two part column
Dear R-helpers, I am a beginner using R. This is the first question in this list. My question, Is there possible to make combinations with two part column? If I have a number 1,2,3,4,5,6,7,8. I need the result something like below: 1,2,3,4,5 6,7,8 1,2,3,4,7 5,6,8 2,3,4,5,6 1,7,8 1,2,3,6,7 4,5,8 1,2,3,4,8 5,6,7 3,4,6,7,8 1,2,5 .... I would be very happy if anyone could
2012 Dec 15
3
interfacing with .Call
Hi My code is as following: #include <R.h> #include <Rinternals.h> //* the Projector part *// void Projector(double *L, int *dimL, double *G, int *dimG, double *W, int *dimW, int *xymod, int *dimxy, double *modif, int *dimif, double *Lsum) { ...} //* the interface part *// #define getDim(A) INTEGER(coerceVector(getAttrib(A,R_DimSymbol), INTSXP)) SEXP Projector5(SEXP L, SEXP G,
2019 Jul 24
1
[External] Re: Any plans for ALTREP lists (VECSXP)?
I can work on this. Thanks Luke. ~G On Wed, Jul 24, 2019 at 8:25 AM Tierney, Luke <luke-tierney at uiowa.edu> wrote: > If one of you wanted to try to create a patch to support ALTREP > generic vectors here are some notes: > > The main challenge I am aware of (there might be others): Allowing > DATAPTR to return a writable pointer would be too dangerous because > the GC
2011 Oct 24
2
C function is wrong under Windows 7
Dear mailing list, I have a C function that gives me a wrong result when I run it under Windows 7. This is the code under Linux (RHEL5): > library(phenoTest) > data(epheno) > sign <- sample(featureNames(epheno))[1:20] > score <- getFc(epheno)[,1] > head(score) 1007_s_at 1053_at 117_at 121_at 1255_g_at 1294_at -1.183019 1.113544 1.186186 -1.034779 -1.044456
2007 Jan 19
5
Problem with C extension
Hello, I try to write an extension in C, to get a faster functions. Therefore I have to add an element (vector) to a vector. The command in R is very simple: x = c(x,a) But in C I have the problem to reallocate my vector for getting more space. Everything I tried, I get a "Segmentation fault". So, how can I combine two vectors in C and give the result back to R (return(x))? Thanks
2013 Apr 17
1
stack imbalance in max.col for non-real matrices
It's tough to reliably reproduce, but I often get stack imbalance warnings when calling max.col() on non-real/double matrix. The code is conditionally PROTECTing but not incrementing its nprot counter for the eventual UNPROTECT. Pretty sure this would fix (but I haven't tested it): Index: array.c =================================================================== --- array.c (revision
2004 Jun 16
1
off topic: C/C++ codes for pseudo inverse
Hi, I am looking for C/C++ codes for computing generalized inverse of a matrix. Can anyone help me in this regard? Thanks, Mahbub.
2002 Jul 01
3
Discrete random variable
Hi, I would create a function rdiscrete that returns the value of a discrete random variable X defined on a subset which can change, and for the same probability for the issue, eg: X could sometimes take a value in the subset {2,3,4} with probability 1/3 for each issue, and sometimes X could take a value in the subset {2,3,4,5,6} with probability 1/5 for each issue, etc. The function should have
2010 Sep 21
1
Colorramp in Maptools, how to choose min and max values for the fg= argument
Hello, I am using maptools for plooting geographical data. The colour of the region indicates some region dependent value (population for example). I pass the colours of the regions to the plot.Map function by defining the foreground colour: jet.colors = colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F", "yellow",
2020 Sep 08
4
Operations with long altrep vectors cause segfaults on Windows
>>>>> Martin Maechler >>>>> on Tue, 8 Sep 2020 10:40:24 +0200 writes: >>>>> Hugh Parsonage >>>>> on Tue, 8 Sep 2020 18:08:11 +1000 writes: >> I can only reproduce on Windows, but reliably (both 4.0.0 and 4.0.2): >> $> R --vanilla >> x <- c(0L, -2e9:2e9) >> # > Segmentation
2019 Jun 03
2
Converting non-32-bit integers from python to R to use bit64: reticulate
Thank you Martin for giving to know and developing 'Rmpfr' library for unlimited size integers (GNU C GMP) and arbitrary precision floats (GNU C MPFR): https://cran.r-project.org/package=Rmpfr My question is: In the long term (For R3.7.0 or R3.8.0): Does it have sense that CMP substitutes INTSXP, and MPFR substitutes REALSXP code? With this we would achieve that an integer is always an
2020 Jul 22
3
Invisible names problem
I ran into strange behavior when removing names. Two ways of removing names: i <- rep(1:4, length.out=20000) k <- c(a=1, b=2, c=3, d=4) x1 <- unname(k[i]) x2 <- k[i] x2 <- unname(x2) Are they identical? identical(x1,x2) # TRUE but no identical(serialize(x1,NULL),serialize(x2,NULL)) # FALSE But problem is with serialization type 3, cause:
2011 Sep 19
1
Binary optimization problem in R
Dear all, I would like to solve a problem similar to a multiple knapsack problem and am looking for a function in R that can help me. Specifically, my situation is as follows: I have a list of n items which I would like to allocate to m groups with fixed size. Each item has a certain profit value and this profit depends on the type of group the item is in. My problem is to allocate the items
2010 Sep 10
2
[xts, quantmod] segfault probelm when I work with memcpy function
Hi, I work with SEXP C code and with xts and quantmod packages. I try to touch how xts internal works. So we have R session and: > ls() character(0) > getSymbols('AAPL') # quantmod package [1] "AAPL" > ls() [1] "AAPL" > str(AAPL) An ?xts? object from 2007-01-03 to 2010-09-09 containing: Data: num [1:929, 1:6] 86.3 84 85.8 86 86.5 ... - attr(*,