search for: dblepr

Displaying 16 results from an estimated 16 matches for "dblepr".

2001 May 09
1
Fortran subroutines dblepr, realpr, intpr
I am making my first attempts at using some Fortran code with R, and so far it's going OK. To print from my Fortran programs, it seems I need subroutines dblepr, realpr and intpr. From the excellent "Writing R Extensions" document: "Three subroutines are provided to ease the output of information from FORTRAN code. subroutine dblepr(label, nchar, data, ndata) subroutine realpr(label, nchar, data, ndata) subroutine intpr (label, nchar...
2010 Nov 16
4
DBLEPR?
Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional (but not reproducible) errors, seemingly on Windows only. There is some suspicion that its use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the archives, though it is in the R FAQ and Brian R. mentions they are in libR in a 2009 post. Are the xxxPR routines now deprecated (par...
2010 Nov 16
4
DBLEPR?
Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional (but not reproducible) errors, seemingly on Windows only. There is some suspicion that its use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the archives, though it is in the R FAQ and Brian R. mentions they are in libR in a 2009 post. Are the xxxPR routines now deprecated (par...
2010 Dec 09
1
How to call DBLEPR in Fortran code to be used by R
Hi I've built a dll using Fortran code and can call it by either R or Fortran. Calling by the former gives me the wrong answer and the later gives the correct answer. From what I've read, it looks like I should use the subroutines DBLEPR, INTPR and REALPR to get values to show up in R which I hope will allow me to find the error. I've downloaded the R-2.12.0.tar.gz but have been unable to find these subroutines or any examples of how to get Fortran to recognize them. Obviously when I try to compile I get undefined referen...
1999 Sep 06
1
Fortran character strings
...char ** [compiler dependent] Character strings are passed as C arrays of character strings to Fortran: the first string may be usable if its length is passed separately. and I have been taking a look. The linkage sends char ** to Fortran. On the other hand, INTPR and DBLEPR assume Fortran character strings are char *. On all my systems DBLEPR works and .Fortran does not, but I do know of one compiler (Watcom Fortran for Windows NT) where the linkage really is equivalent to char **. Fortran in S takes the first string in a character vector and passes that as char *...
2005 Jun 14
1
Calling C from Fortran
...d like to call C routines from Fortran as suggested in section 5.6 of the "Writing R extensions" documentation. I'm familiar with Fortran but not with C. I understand the example provided in Fortran: subroutine testit() double precision normrnd, x call rndstart() x = normrnd() call dblepr("X was", 5, x, 1) call rndend() end but I don't understand the purpose of this C wrapper: #include <R.h> void F77_SUB(rndstart)(void) { GetRNGstate(); } void F77_SUB(rndend)(void) { PutRNGstate(); } double F77_SUB(normrnd)(void) { return norm_rand(); } neither how I shou...
1998 Sep 18
1
R-beta: undefined reference to `realpr_' ?
Hi, Win95 version, trying to build multiv. Following error (no mention in faq etc, but someone may have mentioned it recently). Appreciate any help. ------- Building multiv.dll from multiv.a -------- echo LIBRARY multiv > multiv.def echo EXPORTS >> multiv.def nm multiv.a | sed -n "/^........ [DT] _/s/^........ [BCDRT] _/ /p" >> multiv.def gcc -mdll
2010 Dec 14
1
How to specify compiler options when using R CMD SHLIB
Hi I've built a dll using Fortran code and can call it by either R or Fortran. Calling by the former gives me the wrong answer and the later gives the correct answer. >From what I've read, it looks like I should use the subroutines DBLEPR, INTPR and REALPR to print to the R console rather than using Fortran standard I/O and that if I use the command R CMD SHLIB source.f that these subroutines will automatically be found (Please correct me if I'm wrong about any of this). The problem is that I have to specify the gfortran co...
2000 Feb 02
1
(not) compiling fortran -- dynamic loading problem
Hi, everyone. This may be properly a fortran question rather than an R question. I'm trying to add a few print statements to otherwise working fortran code in one of the libraries so I can see what's going on in the code. I have no problem doing so on an SGI machine, but under LinuxPPC I've run into a problem. The code compiles and creates a shared object (.so), but when I issue
2005 Jun 14
3
Calling C from Fortran
...l C routines from Fortran under linux as suggested in section 5.6 of the "Writing R extensions" documentation. I'm familiar with Fortran but not with C. I understand the example provided in Fortran: subroutine testit() double precision normrnd, x call rndstart() x = normrnd() call dblepr("X was", 5, x, 1) call rndend() end but I don't understand the purpose of this C wrapper: #include <R.h> void F77_SUB(rndstart)(void) { GetRNGstate(); } void F77_SUB(rndend)(void) { PutRNGstate(); } double F77_SUB(normrnd)(void) { return norm_rand(); } neither how I shou...
2009 Dec 29
2
how can I use R functions in Fortran 90
Hi all, Is there a way that I can import R functions into Fortran? Especially, I want to generate random numbers from some not-so-common distributions (e.g. inverted chi square) but did not find any routines written in Fortran that deal with distributions other than uniform and normal. Thanks. Anny [[alternative HTML version deleted]]
1998 Aug 28
0
R-beta: R-0.62.3 is released
...ly, this will be the last of the 0.62 series, 0.63 is getting pretty stable now. Here's the top of the CHANGES file: CHANGES IN R VERSION 0.62.3 NEW FEATURES o preserve factor levels and contrast settings in model objects o factor[...,drop=T] reduces level set o added dblepr, intpr o do_modelmatrix(model.c): Set rownames from data argument. o New generic function preplot(). o A new R BATCH interface for non-interactive execution. o Added `offline' argument to help() for producing hardcopy via latex and dvips. o glm.fit.null now cal...
1998 Aug 28
0
R-beta: R-0.62.3 is released
...ly, this will be the last of the 0.62 series, 0.63 is getting pretty stable now. Here's the top of the CHANGES file: CHANGES IN R VERSION 0.62.3 NEW FEATURES o preserve factor levels and contrast settings in model objects o factor[...,drop=T] reduces level set o added dblepr, intpr o do_modelmatrix(model.c): Set rownames from data argument. o New generic function preplot(). o A new R BATCH interface for non-interactive execution. o Added `offline' argument to help() for producing hardcopy via latex and dvips. o glm.fit.null now cal...
2011 Mar 24
1
.Fortran successful, R locks up.
Howdy, I am having a problem with a library compiled from some legacy fortran code. I can call the library, it runs as it should, returns a list, and gives a ">" prompt, but then locks up the R session. Functions typed in return nothing. ctrl-c results in a new prompt that is still locked up, and R overwhelms the processor. This happens on Mac, Windows, and Linux exactly the same. I
2001 Jul 25
2
Installation help
...-o util.o cc -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -c version.c -o version.o cc -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -c vfonts.c -o vfonts.o f77 -g -O2 -c xxxpr.f -o xxxpr.o xxxpr.f: intpr: realpr: dblepr: /Net/local/bin/cc -o R.bin CConverters.o Rdynload.o RNG.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o devPS.o devPicTeX.o deparse.o deriv.o devices.o dotcode.o dstruct.o duplicate.o e...
2009 Jan 15
2
Interface to open source Reporting tools
...causing "multiple definitions of symbol") I suggest that the docu > should provide file names for the two example programs, e.g.: > > frand.f: > > subroutine testit() > double precision normrnd, x > call rndstart() > x = normrnd() > call dblepr("X was", 5, x, 1) > call rndend() > end > > frand-helper.c: > > #include <R.h> > > /* Fortran */ > void F77_SUB(rndstart)(void) { GetRNGstate(); } > void F77_SUB(rndend)(void) { PutRNGstate(); } > double F77_SUB(normrnd)(void) { return norm...