Displaying 20 results from an estimated 1000 matches similar to: "Calling R functions from C"
2006 Oct 31
2
plotting multiple groups (newbie Q)
Hi Folks,
After loading a data set, I run the following:
> kSum <- orderBy(~group,(summaryBy(DP_Level~F2
+group,data=kdata,FUN=c(mean,sd),na.rm=T)))
kSum looks like this:
> kSum
F2 group DP_Level.mean DP_Level.sd
1 1.0 N -1.55186475 11.022245
4 2.0 N -2.48013300 10.624583
7 3.0 N -12.47671250 11.104792
10 4.0 N -13.72430950 12.000779
13
2011 Jan 26
2
Colour area under density curve
Hello,
I have this code to plot a certain normal distribution and represent the pnorm
value for a certain "x":
x<-300
xx <- seq(2.5,7.5, by=0.1)
yy <- dnorm(xx,5.01,0.77)
d<-signif(pnorm(log(x), 5.01,0.77),4)
xpts <- round(exp(0:8))
par(bg = "antiquewhite")
plot(xx,yy, type="l", col="blue", lwd=2, xaxt="n",
2009 Feb 27
1
formula formatting/grammar for regression
Hi all,
I am doing some basic regression analysis, and am getting a bit
confused on how to enter non-polynomial formulas to be used.
For example, consider that I want to find A and r such that the
formula y = A*exp(r*x) provides the the best fit to the line y=x on
the interval [0,50].
I can set:
xpts <- seq(0, 50, by=0.1)
ypts <- seq(0, 50, by=0.1)
I know I can find a fitted polynomial
2007 Feb 13
4
Advice on visual graph packages
Hey, all. I'm looking for packages that are good at two things
1) Drawing directed graphs (i.e nodes and edges), both with single
and double headed arrows, as well as allowing for differences in line
width and solid versus dashed. Note: I've tried Rgraphviz here, but
have run into some problems (which seem fixable and I may go with it
in the end), and it doesn't satisfy need
2009 Jun 15
1
altering a global variable
I'm working on a program that loads several large data files. I'm
using ddply (plyr is really awesome) but I want to minimize the amount
of times a large data file is read in. One solution is to keep track
of which data file is open with a global variable and then change the
currently open data file globally as needed. However, I'm unclear on
how to alter a global variable
2008 Apr 15
2
glht with a glm using a Gamma distribution
Quick question about the usage of glht. I'm working with a data set
from an experiment where the response is bounded at 0 whose variance
increases with the mean, and is continuous. A Gamma error
distribution with a log link seemed like the logical choice, and so
I've modeled it as such.
However, when I use glht to look for differences between groups, I get
significant
2005 Jul 25
1
Rmath library problems
Hello,
Has anybody successfully called the Rmath library from C using the MS
Visual Studio compiler (I am using Visual Studio 6.0)?
I have compiled the Rmath library using gcc, and the 'test.c' program
(which makes a call to qnorm) works fine when compiled with gcc. However,
I get a fatal memory error when I run it after compiling it with Visual C.
Would this memory problem be related
2002 Nov 21
1
html Search Engine not working
Hi All,
Just installed R on my powerbook G4 (Darwin; see more info below) but
have trouble with the the Search Engine and Keywords html page after
help.start() (with Mozilla 5.0). I've browsed the archives and have
seen some references to similar problems, but can't figure out how to
fix it so that the search function works. When attempting to search
for help using a keyword,
2011 Jan 20
1
GPU packages and 'Debian R Policy'
Hi there,
Moving this request for info over from an R-HPC-SIG list thread as
the issue is less HPC than something that has bitten me as a result
of trying to install HPC (read CUDA) R packages.
Background to this is that I have both a Ubuntu host for a Tesla card
that some researchers are looking to do CUDA-related R computation on,
and a prototype, RHEL-based, cluster that is being used to
2005 Nov 08
2
A Quick and (Very) Dirty Intro to Stats in R
Greetings to all,
First off, I want to thank you all for answering any nagging questions
I've had over the past few days. I've been in the process of putting
together A Quick and (Very) Dirty Intro to Doing Your Statistics in R
(which I have posted to http://didemnid.ucdavis.edu/rtutorial.html ) in
order to teach an R workshop for the graduate students in my
department. This is a
2005 Nov 15
1
Repeates Measures MANOVA for Time*Treatment Interactions
Dear R folk,
First off I want to thank those of you who responded with comments for
my R quick and dirty stats tutorial. They've been quite helpful, and
I'm in the process of revising them. When it comes to repeated
measures MANOVA, I'm in a bit of a bind, however. I'm beginning to see
that all of the documentation is written for psychologists, who have a
slightly
2023 Feb 16
0
User-defined RNG with the standalone Rmath library
I have two questions about using a user-defined random number generator (RNG) with the standalone Rmath library. The default RNG with the standalone Rmath library is the Marsaglia-multicarry generator, which has poor properties. The "R Installation and Administration" manual, in the section "The standalone Rmath library", states that:
```
A little care is needed to use the
2010 Feb 16
1
suppress printing within a function
I'm working with a few functions (e.g. do.base.descriptions in the
netstat package) that, in addition to returning an object with
variables I want to extract, also print output. There is no way to
turn this default printing behavior off in many of the functions.
Is there a blanket way to suppress such printing, say, within a loop
or a ddply statement?
Thanks!
-Jarrett
2010 Jun 10
1
Rmath.dll importing in VB6 problem
Hi,
I am facing a problem which i think i need to explain it to you with some
background.
I need to use the Project R pnorm function in Visual Basic 6.0.
I have already installed R and this is how i perform and get back the
result:
> pnorm(2, 15)
[1] 6.117164e-39
which is what i need.
I have already installed R, i generated the Rmath.DLL file out so i can
import it into my VB6 and use it.
2008 Oct 11
1
defines in Rmath.h and R_NO_REMAP
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
I'm programming with R 2.7.2 and had some trouble including
Rmath.h for its random variates generation routines: Although
I define R_NO_REMAP (which works fine for Rinternals.h stuff),
Rmath.h defines "beta" as "Rf_beta" etc., so that my "beta" strings
get redefined as well! Is this a feature?
I found an old
2006 Nov 28
3
comments in scan
I had a question about scan in R. For better code readability, I
would like to have lines in the block of data to be scanned that are
commented - not just lines that have a comment at the end. For example
#age, weight, height
33,128,65
34,56,155
instead of having to do something like
33,128,65 #age, weight, height
34,56,155
Is this at all possible?
2007 Aug 31
0
Studio 11 compiling of Rmath standalone versus compiling R
Hi,
I have a UNIX-Solaris-Sparc-Studio 11 compilers question. Since it's not exactly a programming question, I'm posting it here instead of to the developers list.
Here's the relevant info:
1) I'm using SunOS 5.9 on a 32 bit machine without parallel processing. The chip is Sparc.
2) I've installed the Sun Studio 11 compilers.
3) I've successfully built and tested R 2.5.1
2006 Sep 13
1
Updating lmer - object is not subsettable?
I'm attempting to write a general function to implement Faraway's
bootstrapping algorithm for mixed models with lmer, but have run into
a curious problem. I'm comparing two models
model.1<-lmer(Response ~ Treatment + (1|Trial), data=exp.data,
method="ML")
model.2<-lmer(Response ~ 1 + (1|Trial), data=exp.data, method="ML")
When I attempt to update
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
2005 Nov 08
2
Simple Nesting question/Odd error message
I'm attempting to analyze some survey data comparing multiple docks. I
surveyed all of the slips within each dock, but as slips are nested
within docks, getting multiple samples per slip, and don't really
represent any meaningful gradient, slip is a random effect. There are
also an unequal number of slips at each dock.
I'm having syntactical issues, however. When I try