search for: ksum

Displaying 2 results from an estimated 2 matches for "ksum".

Did you mean: csum
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...
2005 Oct 28
1
Calling R functions from C
...ssible to use a few R functions (such as "dnorm") within C by including the "Rmath.h" header file in your C code: e.g. #include <R.h> #include <Rmath.h> void kernel_smooth(double *x, int *n, double *xpts, int *nxpts, double *h, double *result) { int i, j; double d, ksum; for(i=0; i < *nxpts; i++) { ksum = 0; for(j=0; j < *n; j++) { d = xpts[i] - x[j]; ksum += dnorm(d / *h, 0, 1, 0); } result[i] = ksum / ((*n) * (*h)); } } In the manual "Writing R extensions" there is also a list of special functions which can be called in C. I was wondering whe...