Displaying 20 results from an estimated 10000 matches similar to: "calling c function from R"
2012 Dec 06
1
Use .Call interface
Hi
I've written the following program:
#include <R.h>
#include <Rdefines.h>
#include "Projector.h"
SEXP Projector2(SEXP L, SEXP G, SEXP W, SEXP xymod, SEXP modif){
int nprot=0;
PROTECT(L=AS_NUMERIC(L));nprot++;
PROTECT(G=AS_NUMERIC(G));nprot++;
PROTECT(W=AS_NUMERIC(W));nprot++;
PROTECT(xymod=AS_INTEGER(xymod));nprot++;
PROTECT(modif=AS_NUMERIC(modif));nprot++;
2010 Feb 12
1
R - Compiling and calling Fortran code that uses IMSL libraries - Help!
Good Afternoon R Help!
On of my users is seriously thinking about moving to R from Splus. In his
testing, he has already found some benefits to it. He has, however run
into one issue, calling his Fortran functions in R. Previously, in Splus,
he would do the following:
1. Compile via f90 the *.f program
2. link the object file to the Fortran IMSL libraries via the 'ld' command
3.
2005 Aug 21
2
bizarre signif stars in Sweave latex
OK. I give up. I'll ask a stupid question.
How do I get the $!#@*$ signif stars line printed by summaries
to not look extremely bizarre in the latex produced by Sweave?
For example, see p. 7 of
http://www.stat.umn.edu/geyer/aster/library/aster/doc/tutor.pdf
I can see what the problem is. R emits non-ascii characters (as it
is supposed to do), Sweave puts them in the tex file, and
2010 Aug 24
5
Sweave.sty
Does anyone know where I can download the latest version of Sweave.sty? I have looked all over the site http://www.stat.umn.edu/~charlie/Sweave/ with no luck.
2008 Oct 13
1
MiKTEX-texi2dvi
Sorry, I forgot to include a reproducible example on my last e-mail but here it is: Since the file is large to be included here:
The path to the foo.Rnw examples is:
www.stat.umn.edu/~charlie/Sweave/foo.Rnw
and is suppossed to produce a pdf like this one:
http://www.stat.umn.edu/~charlie/Sweave/foo.pdf
I have downloaded MiKTEX but I don't know how to make it work. Sweave and Stangle seem to
2001 Oct 26
1
ks.test (PR#1004)
The note to 1004 says "fixed for 1.3.1"
Uh. No. It ain't.
The problem was more serious than guessed as even the simplest testing
would show.
For example, Example 5.4 in Hollander and Wolfe (Nonparametric Statistical,
Methods, 2nd ed., Wiley, 1999, pp. 180-181)
R Version 1.3.1 (SuSE Linux 7.1)
> X <-
2010 Jun 15
1
location of Sweave.sty in R devel (2010-06-15 r52280)
Sorry if I was supposed to file a bug report, but I don't know whether
we're supposed to do that on R devel. I just built R devel from source
(2010-06-15 r52280) and tried to check a package with it and Sweave
failed on the vignette. It puts the line
\usepackage{/HOME/faculty/charlie/local/devel/lib64/R/share/texmf/Sweave}
in the *.tex file but, that's not where Sweave.sty is
oak$
2012 Oct 19
2
setting option in function
is it possible to set an option inside a function ((I want to set
na.action = na.fail) and have the previous state restored if there is
an error so that the function doesn't change the option behind the
user's back?
Sorry if this has been answered before, but this subject is hard to Google.
--
Charles Geyer
Professor, School of Statistics
University of Minnesota
charlie at stat.umn.edu
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,
2005 Apr 01
2
formulas and frames
I have a design problem. I'm trying to design a package that does
something like glm, but
1. the response is multivariate, so I can't be just like glm
and get the response variables out of the formula. I decided
(perhaps incorrectly) to just supply the response variable
names as an argument "response".
2. I have the usual predictor variables.
3. I
2020 Feb 29
3
tcl problem with R-3.6.3?
I knew I could work around. But this shouldn't happen.
And yes. Same problem with your example.
blurfle$ R --vanilla
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain
2008 Jan 22
3
gctorture and proc.time (PR#10600)
In R version 2.6.1 (2007-11-26)
and R version 2.6.1 Patched (2008-01-19 r44061)
on openSUSE 10.2 (X86-64)
> gctorture()
> proc.time()
Error: protect(): protection stack overflow
The problem with this is that then
R CMD check --use-gct foo
ALWAYS FAILS with
> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
Error in
2005 Jan 21
1
niceness
Can anyone tell me if the following C code (which proved very useful when
using the snow package -- use it to nice slaves) compiles and dyn.loads
under Windoze or Mac? It is (apparently) POSIX, so I suppose it is fine
in OS X, but does Windoze's advertized POSIX compliance mean anything here?
If it doesn't work on some platform, how do I deal with that? I want
to submit as contributed
2017 Jan 18
1
unlicense
>>>>> Charles Geyer writes:
> In that case, perhaps the question could be changed to could CC0 be
> added to the list of R licences. Right now the only CC licence that
> is in the R licenses is CC-BY-SA-4.0.
Hmm, I see
Name: CC0
FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#CC0)
OSI: NA (https://opensource.org/faq#cc-zero)
URL:
2020 Feb 29
2
tcl problem with R-3.6.3?
Just built 3.6.3 from source and tcl doesn't work. Worked fine with the
same laptop in 3.6.2. Here's the exact error.
blurfle$ R --vanilla
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to
2005 Sep 17
1
looks in liblapack.a not liblapack.so
I can't compile R-alpha on AMD 64. Rather than include a 1400 line script
I have put it on the web
http://www.stat.umn.edu/~charlie/typescript.txt
way down near the bottom it fails building lapack.so
gcc -shared -L/usr/local/lib64 -o lapack.so Lapack.lo -llapack -lblas -lg2c -lm -lgcc_s
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld:
2017 Jan 13
4
unlicense
I would like the unlicense (http://unlicense.org/) added to R
licenses. Does anyone else think that worthwhile?
--
Charles Geyer
Professor, School of Statistics
Resident Fellow, Minnesota Center for Philosophy of Science
University of Minnesota
charlie at stat.umn.edu
2001 Oct 26
2
wilcox.test point estimates perverse (PR#1150)
The point estimates produced by wilcox.test are perverse (not wrong, just
brain damaged). The Hodges-Lehmann estimator that goes with the signed
rank test is the median of the Walsh averages. The Hodges-Lehmann estimator
that goes with the rank sum test is the median of the pairwise differences.
wilcox.test agrees except that it uses the following very peculiar definition
of "sample
2004 Feb 13
6
Building r-devel on Panther
I did:
./configure --with-blas='-framework vecLib' --with-lapack --with-aqua
make
sudo make install
sudo make install-aqua
Everything seems to be OK (some warnings about multiple definitions of
some symbols). However:
bass$ /Library/Frameworks/R.framework/Resources/bin/R
Fatal error: unable to open the base package
I got the same message when clicking on R.app in /Applications
This
2009 Aug 16
1
R CMD check --use-valgrind doesn't run valgrind on tests
R CMD check --use-valgrind <packagename> used to run valgrind on the
tests in the tests directory of the package. But it seems to have stopped.
R-2.9.1 doesn't -- at least on my box -- and neither does R-2.10.0 (devel).
I am not sure when this stopped. I think 2.8.x did this. The only old
R I have around is 2.6.0 and it certainly does.
R CMD check --help for 2.9.1 says (among other