similar to: list/matrix chimera

Displaying 20 results from an estimated 2000 matches similar to: "list/matrix chimera"

2013 Apr 26
1
RFC: R_data_class as part of the C-API
Hi, In src/attrib.c, the comment for the function R_data_class is: ``` /* the S4-style class: for dispatch required to be a single string; for the new class() function; if(!singleString) , keeps S3-style multiple classes. Called from the methods package, so exposed. */ SEXP R_data_class(SEXP obj, Rboolean singleString) ``` I am obviously writing this because I'd wish to see it
2007 Oct 07
1
R 2.6.0 S4 data breakage, R _data_class(), class<-, etc.
Hi, (somebody would probably yell at me for not checking 2.6.0rc, for which I can only apologize...) Our R package (snpMatrix in http://www-gene.cimr.cam.ac.uk/clayton/software/) is broken rather badly in 2.6.0 ; I have fixed most of it now so a new release is imminent; but I'd like to mention a few things, mostly to summarize my experience and hopefully the 'writing R extensions'
2005 Jul 20
1
(PR#8017) build of REventLoop package crashes with 2.1 due
In what way is this a bug in R? It looks like a bug in the package, and as Defn.h is not part of R's API any packge using it is `at risk' (and cannot be installed in a binary-only installation, or even an installed version of R). In particular, Defn,.h depends on config.h, and it seems you installed a binary version of R and used separate sources. I would suggest building R from
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.
2005 Jul 19
0
build of REventLoop package crashes with 2.1 due tosyntax error in Defn.h (PR#8017)
Full_Name: Richard Boyce Version: 2.1.-1 OS: Debian testing/unstable Submission from: (NULL) (128.95.123.29) While building a custom package using a modified version of Duncan's REventLoop with R version 2.1 (Debian package r-base, r-base-dev) and R source from apt-get source 2.1.1 I get the following error: $ R CMD build vjREventLoop * checking for file
2012 Jun 19
1
R and C pointers
Dear R devel, Apologies for these (most probably trivial) questions, doing my first attempt to call C from R (and actually learning C in the process). I need to pass a matrix to C, and after reading R-exts.pdf (many times), I was unable to find how to handle matrices at C-level... except for, what probably is the answer, that matrices are in fact vectors with dimensions. This is a sample code I
2002 Dec 18
2
meta analysis
Dear R-lister, is there any function for Meta Analysis in R? (like homogeneity an, risk differences, relative riskm amd odds ratios? Many thanks, Edwin
2001 Mar 27
1
sort(list(..)) ?
Looking at the source code of sort() -- for some speedup considerations -- I found that we currently use isVector() for testing the validity of x in sort(x) whereas I think we should use isVectorAtomic(), actually for S-plus compatibility additionally allowing NULL. Hence I'd propose to replace the test if (!isVector(CAR(args))) errorcall(call, "only vectors can be sorted");
2010 Sep 08
0
Correction to vec-subset speed patch
I found a bug in one of the fourteen speed patches I posted, namely in patch-vec-subset. I've fixed this (I now see one does need to duplicate index vectors sometimes, though one can avoid it most of the time). I also split this patch in two, since it really has two different and independent parts. The patch-vec-subset patch now has only some straightforward (locally-checkable) speedups for
2006 Jan 23
1
formatC slow? (or how can I make this function faster?
I'm trying to convert a matrix of capture occasions to format that an external program can read. The job is to basically take a row of matrix, like > smp[1,] [1] 1 1 0 1 1 1 0 0 0 0 and convert it to the equivalent string "1101110000" I'm having problems doing this in a speedy way. The simplest solution (calc_history below, using apply, paste and collapse) takes about 2
2006 Aug 03
1
question about dll crashing R
I have ported some R code to C to make it faster. I can perform .Call("foobar",....) once and it works fine. Absolutely correct answer. If I put a loop inside foobar and run the main code routine more than 100 times, it crashes R. Or if I call .Call("foobar"....) seperately more than two tims it crashes R. For the most part I am doing matirx multiplies using EXP
2000 Jul 12
1
getAttrib() and setAttrib()
Hello: I am looking at "Writing R Extensions", subsection 3.6.4, using R 1.1.0, under NT4.0, with VC++ 6.0. Under these conditions I can use the first method given for coding the out() function, but not the second, which uses getAttrib() and setAttrib(). I hope that someone will tell me how this second method can also be made to work. Details follow, for anyone kind enough to help.
2006 Oct 15
1
Feature request: names(someEnv) same as ls(someEnv)
Hi, I would be nice if names() returned the equivalent of ls() for environments. --- a/src/main/attrib.c +++ b/src/main/attrib.c @@ -687,6 +687,8 @@ SEXP attribute_hidden do_names(SEXP call s = CAR(args); if (isVector(s) || isList(s) || isLanguage(s)) return getAttrib(s, R_NamesSymbol); + if (isEnvironment(s)) + return R_lsInternal(s, 0); return R_NilValue; }
2008 Apr 10
1
Computing time when calling C functions - why does an extra function call induce such an overhead?
Dear list, I am a little puzzled by computing time in connection with calling C functions. With the function mysolve1 given below I solve Ax=B, where the actual matrix operation takes place in mysolve2. Doing this 5000 times takes 3.51 secs. However, if I move the actual matrix inversion part into mysolve1 (by uncommenting the two commented lines and skip the call to mysolve2) then the
2000 Sep 07
1
getAttrb - Solved
Hi, I changed INTEGER(getAttrib(shape,mkChar("nParts")))[0] to INTEGER(getAttrib(shape,mkString("nParts")))[0] and now it works fine. Nicholas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2006 Mar 27
1
Safe to UNPROTECT() when object is assigned to a list?
Hi, I'm troubleshooting some native code on Windows that very occationally (and semi-randomly) crashes R. Already looked at "everything", I just want to double check that it is safe to UNPROTECT() allocated variables as soon as they are assigned to, say, a PROTECTed list. >From (R v2.3.0) Section 5.7.1 "Handling the effects of garbage collection" in "Writing R
2004 Feb 11
1
.Call setAttrib(ans,R_DimSymbol,dim); Crashes.
Hi! I want to return a matrix. The code does the R interfacing. This version does it fine. SEXP ans,dim; PROTECT(ans = NEW_NUMERIC(count*2)); memcpy(NUMERIC_POINTER(ans),result,count*sizeof(double)); memcpy(&(NUMERIC_POINTER(ans)[count]),occur,count*sizeof(double)); /** PROTECT(dim=NEW_INTEGER(2)); INTEGER_POINTER(dim)[0]=2; INTEGER_POINTER(dim)[1]=count;
2006 Mar 09
0
When calling external C-function repeatedly I get different results; can't figure out why..
Dear all, I need to calculate tr(xyxy) fast for matrices x and y. Inspired by the R-source code, I've created the following functions (I am *new* to writing external C-functions, so feel free to laugh at my code - or, perhaps, suggest changes): #include <Rinternals.h> #include <R_ext/Applic.h> /* for dgemm */ static void matprod(double *x, int nrx, int ncx, double *y, int
2006 Mar 09
0
When calling external C-function repeatedly I get differentresults; can't figure out why..
Not an expert in programming either, but to me it seems like you've forgotten to initialize the variable "tr". It just picks up garbage from allocated memory previously initialized by other processes. Med venlig hilsen Frede Aakmann T?gersen > -----Oprindelig meddelelse----- > Fra: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] P?
2009 Apr 09
0
bug/suggestion: debugger should respect option "deparse.max.lines" when printing the call (PR#13647)
Full_Name: John Brzustowski Version: 2.8.1 OS: linux Submission from: (NULL) (67.71.250.146) When entering a debug()'ed function, the call printout is not limited by options()$deparse.max.lines as it is when one uses browser() or trace(). Should it be? If so, here's a patch: diff -cr R-2.8.1/src/library/base/man/options.Rd R-2.8.1-patched/src/library/base/man/options.Rd ***