similar to: loading c code in windows ambient

Displaying 20 results from an estimated 2000 matches similar to: "loading c code in windows ambient"

2005 Sep 30
3
.C help
Hi, I am hoping some one can help me. I am learning to use C and would like to learn how to call c code in R. I have look at Writing R Extensions and I tried to copy the example on page 38 void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j <
2012 Mar 15
4
replicating C example from the Extensions Manual problem
Dear R People: Here is something that I am sure is very simple. I'm just trying to re-create the C convolution example in the Extensions manual. Here is the subroutine: void convolve(double *a, int *na, double *b, int *nb, double *ab) { R_len_t i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j < *nb; j++) ab[i + j] += a[i] *
2005 Oct 26
1
Borland C++ and [R] dyn.load() for windows
Hi, I compiled a C program file on Borland C++ 5.5 compiler to get one dll output (as instructed in the file readme.package). The C program file is just the example on page 31 of "writing R extensions": void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j
2004 Aug 04
1
load shared object
Hi all, i have some problem in using shared objects. I tried the example found in "Writing R Extension", pg. 33 I used the .c file prova.c : ------------------------------------------------------------------- #include <R.h> #include <Rinternals.h> void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j , nab = *na + *nb - 1; for (i = 0; i < nab;
2010 Apr 13
2
Getting started with .C
Jeff Brown wrote: > > Hi, > > I'm trying to learn to use .C, which lets one invoke compiled C code from > within R. To do that, one has to first get the C code into R as a shared > object, which (I think) means first compiling it (with COMPILE or SHLIB) > and then loading it (with dyn.load()). > I would suggest taking it a step further and building an R package
2004 Feb 01
4
I can't make .C(...) web-page example.
Hi everyone! I'm trying to lear how to call external C code in R but even the R help web-page example is drive me crazy. I copy-paste the example at: http://stat.ethz.ch/R-manual/R-patched/doc/manual/R-exts.html#Interface%20functions%20.C%20and%20.Fortran here is the example: void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0;
2007 Feb 02
1
Inaccuracy in ?convolve
Hi, Man page for 'convolve' says: conj: logical; if 'TRUE', take the complex _conjugate_ before back-transforming (default, and used for usual convolution). The complex conjugate of 'x', of 'y', of both? In fact it seems that it takes the complex conjugate of 'y' only which is OK but might be worth mentioning because (1) conj=TRUE is the
2005 Jul 20
2
Issues with convolve
We obtained some disturbing results from convolve() (inaccuracies and negative probabilities). We'll try to make the context clear in as few lines as possible... Our function panjer() (code below) basically computes recursively the probability mass function of a compound Poisson distribution. When the Poisson parameter lambda is very large, the starting value of the recursive scheme ---
2011 Aug 11
1
.C and .Call: convolve example not working
Dear R users, I want to call C code via the .C or .Call interface. This works fine with integer values but using doubles the array received in C will be set to zeros. I have tried the convolve examples (Writing R extensions, chapter 5.2) and still the resulting array consists of zeros. My code (shortened for my purposes. Original did not work either):
2008 Apr 16
1
Load the shared object/DLL
Dear All, I have written a function in c (in a file named 'a.c') as follows, void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j < *nb; j++) ab[i + j] += a[i] * b[j]; } Then, I created a shared file in the Windows, R CMD SHLIB -d -o
2011 May 18
1
Convolution confusion:
Hi, I'm new to R, and I'm a bit confused with the "convolve()" function. If I do: x<-c(1, 2, 3) convolve(x, rev(x), TRUE, "open") = 9 12 10 4 1 But I expected: 3 8 14 8 3 (like in Octave/MATLAB - conv(x, reverse(x)) ) 3 2 1 x 1 2 3 = 3 2 1 0 6 4 2 0 0 9 6 3 = 3 8 14 8 3 The thing is, that "convolve(x, x, TRUE, "open")" works. For me
2013 Jun 23
1
stats::convolve documentation enhancement
Hi, the function stats::convolve does not mention efficient usage of the underlying FFT algorithm, such as (a) if type="circular", then length(x)=length(y) should have many factors (e.g. length(x) = length(y) = 2^n) (b) if type="open" or "filter", then length(x)+length(y)-1 should have many factors (e.g. length(x)+length(y)-1 = 2^n) In particular the latter may
1999 Nov 18
1
convolve bug?
I have been experimenting with convolve(). What I know about convolution I learned from engineering (they call this stuff linear systems theory), not statistics, so maybe this is all just a matter of different conventions. BUT I notice very weird things with convolve(). 1. First example, from the classic Bracewell The Fourier transform and its applications, chap 3 (p.32 in 2nd edition): {2 2 3 3
2007 Dec 19
1
strange timings in convolve(x,y,type="open")
Dear R-ophiles, I've found something very odd when I apply convolve to ever larger vectors. Here is an example below with vectors ranging from 2^11 to 2^17. There is a funny bump up at 2^12. Then it gets very slow at 2^16. > for( i in 11:20 )print( system.time(convolve(1:2^i,1:2^i,type="o"))) user system elapsed 0.002 0.000 0.002 user system elapsed 0.373
2006 Apr 12
0
headerfile translation to Delphi (Pascal) completed
Hi, I am happy to announce that I finished the translation of almost all LGPL'ed R headerfiles to Delphi. As a test I did several demos which basically contain delphized versions of all the examples of chapter 5 in "Writing R Extensions". Please have a look in the attachments for details (DemosAndHeaders.txt), more information (Readme.txt) and an example of how it looks
2001 Jun 04
1
2D convolution
Dear all, I have an image that I need to filter, and so I'm looking for a method to convolve it with a matrix. If I understood the docs for convolve correctly, it only works in 1D (and I have tried to convolve, it didn't look good). So, I wondered if anybody have implemented 2D convolution in R, or have any good advices to share (beyond having a look at mvfft), before I go hacking?
2004 Mar 31
3
(no subject)
Hi, I wonder if you can help me: I cannot seem to be able to import my data anymore. When I try to import the attached file with the string FunctRes<-read.table("C:/Documents and Settings/FunctRes.txt", header=FALSE) I obtain: > FunctRes V1 1 ??C 2 \n 3 C 4 0 5 0 6 B 7 \n 8 C 9 0 10 1 11 B 12 \n 13 C 14 0 15 0 16 B 17 \n 18 C 19 0
2010 Jun 04
2
Convolution vector to be derived
I want to generate the following outcome using convolution of two sequences. x <- c(1,2,3,4,5) y <- c(6,7,8,9) The resulting convolution vector is 6 19 40 70 100 94 76 45 When using convolve(), it is hard to produce the result above. Would you help me out to get that? Best regards Moohwan Kim
2004 Jun 09
1
About dll from c++ routine
Hi folks, My system is Windows98 + R1.9.0. The path for my system is c:\perl\bin; c:\mingw\bin; c:\rtools; c:\windows; c:\windows\command; c:\rw1090\bin. I created three files followed the examples in “Writing R extensions” in the directory c:\temp: // X.hh class X { public: X (); ~X (); }; class Y { public: Y (); ~Y (); }; // X.cc #include <iostream> #include "X.hh" static
2007 Mar 13
1
RE: In Asterisk 1.4.x, Why Digium has two H323 channels?
Hi Users, Administrators and Pavel Jezek, You prefer chan_h323 from asterisk tree and it's of course that use channels by tree is very good. But in 1.2.x, the chan_h323 is very simple and the chan_oh323 is so bad. And I work with chan_ooh323, that it's too from Digium and work good! And I am Studing one possible change to Asterisk 1.4.x , but in 1.4.x the oh323 channel don't have more,