similar to: Why is looping in R inefficient, but in C not?

Displaying 20 results from an estimated 200 matches similar to: "Why is looping in R inefficient, but in C not?"

2009 Jun 06
1
Qs on calling R from C
Consider the following simple C program: /*** hello_r.c ***/ #include <Rinternals.h> SEXP hello() { return mkString("Hello, world!\n"); } int main(void) { SEXP x = hello(); return x == NULL; /* i.e. 0 on success */ } This program segfaults: % myR/bin/R CMD LINK gcc -I./R-2.9.0/src/include -L./myR/lib64/R/lib -lR hello_r.c -o hello_r > /dev/null % hello_r zsh:
2005 Oct 06
2
data.frame error using sem package
I keep getting this error when I try to use the sem package. I and another person who has successfully used the sem package for similar analysis (fMRI effective connectivity) cannot figure out what is wrong with my code. I would appreciate any suggestions. The error message: Error in data.frame(object$coeff, se, z, 2 * (1 - pnorm(abs(z))), par.code) : arguments imply differing
2000 Aug 31
2
Problem with R INSTALL locfit on DEC alphaev56-dec-osf4.0d
Dear all, usually I work under linux, but I tried to install R-1.1.1 on our alpha's which worked well. However, installation of the locfit package produced the following warning: ---------%<---------------- Installing package `locfit' ... libs /vol/bin/gcc -I/vol/math/R/include -I/usr/local/include -mieee -g -O2 -c S_e nter.c -o S_enter.o S_enter.c: In function `basis':
2000 May 22
1
character arguments with call_R (PR#552)
character arguments with call_R do not work except in the first position. (In other positions, they just yield a single blank character.) The error is at line 1858 of dotcode.c which should be changed from STRING(CAR(pcall))[i]=s; to STRING(CAR(pcall))[0]=s; Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2003 Jul 16
1
Integrating R in OpenOffice
Hi All, A group of about 3-4 of us are looking into the possibility of incorporating R into OpenOffice's (OO) spreadsheet component (sc) . We wish to use OO's nice ODBC ability to query a postgresql-based gene expression database thus populating an OO sc and then use Bioconductor via R to analyse user-selected parts of this spreadsheet. We've looked at and compiled and used
2011 Dec 28
1
external pointers
I have an external pointer object that I'd like to pass from my R code to some C code. Per Section 5.13 of "Writing R Extensions", I've noted that "external pointers should only be used as part of an object with normal semantics, for example an attribute or an element of a list." So I've written up a workable C function as such: SEXP my_c_function(SEXP param)
2004 Jun 11
1
dll file missing?
Hi, I am trying to "do" a dyn.load(), but I get the following error... > dyn.load("fileGT.dll") Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library "C:/R_Files/fileGT.dll": LoadLibrary failure: The specified module could not be found. It states it can't find the dll but it is in that directory. I have
1999 Apr 07
1
library
I also have several packages in my RW0633 in Windoze and I would like to keep them in one place when I update the R system. Brian say to modify Rprofile to ..lib.loc <- c("c:/MyR/library",.Library) now Rprofile has a line like .lib.loc <- unique(c(unlist(strsplit(getenv("RLIBS"),":")),.Library) Sorry to be dense but where should I put the
2011 Jul 25
1
error in survival analysis
This is a simple R program that I have been trying to run. I keep running into the "singular matrix" error. I end up with no sensible results. Can anyone suggest any changes or a way around this? I am a total rookie when working with R. Thanks, Rasika > library(survival) Loading required package: splines > args(coxph) function (formula, data, weights, subset, na.action, init,
2005 Oct 25
1
Ryan's Q Post-Hoc for ANOVA
I'm using lm to run an ANOVA, and would like to use Ryan's Q as my post-hoc (as recommended by Day and Quinn, 1989, Ecological Monographs). I can't seem to find any methods in the base stats package that implement this post-hoc. Is there a good package of post-hoc methods out there, or has someone written a method for Ryan's Q previously? Thanks! -Jarrett
1998 Oct 28
1
Calling R-Functions from C ?
Hi Is there a way to call R-Functions from C directly ? Is there an API Any comments are welcome. Thanks Reinhard -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To:
1998 Mar 22
3
R-0.61.1 compiled with egcs-mingw32
I have made available the work of the last weekend that I mentioned in my previous messages on ftp://sirio.stat.unipd.it/pub/R. Many thanks to Peter D. and Ross I. for their suggestions. If you think that the work is of some interest, I can upload it to CRAN. guido m. This is the README enclosed in the distribution. -------------------------------------------------------------------------
2011 May 31
2
creating a vector from a file
Hello all, I am new to R and my question should be trivial. I need to create a word cloud from a txt file containing the words and their occurrence number. For that purposes I am using the snippets package [1]. As it can be seen at the bottom of the link, first I have to create a vector (is that right that words is a vector?) like bellow. > words <- c(apple=10, pie=14, orange=5, fruit=4)
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
Further pursuing my curiosity to measure the efficiency of R/C++ interface, I conducted a simple matrix-vector multiplication test using .C and .Call functions in R. In each case, I measured the execution time in R, as well as inside the C++ function. Subtracting the two, I came up with a measure of overhead associated with each call. I assume that this overhead would be non-existent of the entire
1999 Jul 29
0
call_R
I would like to use the call_R mechanism. Unfortunately I don't fully understand what the arguments are from the example in "R-0.64.2/demos/dynload". Could anybody explain me how I have to define the arguments, e.g., I want to call R with 5 doubles (or double[5]) and func does not return a value (is that possible or is it necessary to return at least a dummy?). This is from the
2000 Nov 02
2
RSPerl...
Duncan - (but sent to R-devel, for any other thoughts?) How do you envision RSPerl being used? Without having seen the details, I can think of playing with strings; is there a preferred incantation for stringification of R objects (serialization)? (actually, the main problem I'm having is that I know how I want to code something like: Robject <-
2008 May 14
0
Parallel computing with rgenoud and snow: external file I/O possible?
I am trying to use rgenoud and snow with an external model and file I/O. Unlike the typical application of rgenoud and snow, I need to run an external executable and do pre- and post-processing of input and output files for each parameter set generated by genoud(). I'm hoping that someone can suggest improvements to my approach and a work-around for file I/O problems I've encountered when
2007 Dec 27
0
[ win32utils-Patches-16627 ] Replace inefficient busy wait loop with UDP/IP loopback socket.
Patches item #16627, was opened at 2007-12-26 21:13 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=16627&group_id=85 Category: win32-service Group: Code Cleanup Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Replace inefficient busy wait loop with UDP/IP loopback socket. Initial Comment:
2009 Oct 26
0
[Bug 1665] New: prefix_pton is inefficient
https://bugzilla.mindrot.org/show_bug.cgi?id=1665 Summary: prefix_pton is inefficient Product: py-radix Version: -current Platform: ix86 OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: Default AssignedTo: unassigned-bugs at mindrot.org ReportedBy: weinholt at
2018 Feb 13
0
"search return (min)" is very inefficient
RFC 4731: " IMAP4 Extension to SEARCH Command for Controlling What Kind of Information Is Returned" https://tools.ietf.org/html/rfc4731 I do this (telnet session): """ a select proveedores/TUHS * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted. * 8330 EXISTS * 0 RECENT