Displaying 5 results from an estimated 5 matches for "ntab".
Did you mean:
mtab
2015 Oct 22
2
C_LogLin (stats/loglin)
...rgin)) {
tmp <- margin[[k]]
if (is.character(tmp)) {
## Rewrite margin names to numbers
tmp <- match(tmp, varnames)
margin[[k]] <- tmp
}
conf[seq_along(tmp), k] <- tmp
nmar <- nmar + prod(dtab[tmp])
}
ntab <- length(table)
if (length(start) != ntab ) stop("'start' and 'table' must be same length")
z <- .Call(C_LogLin, dtab, conf, table, start, nmar, eps, iter)
...
--
Kai Nitschke, Dipl.-Psych.
Division of Functional Brain Imaging (FBI)
Dept. of Neurology, Universit...
2011 May 30
0
2D random walk with traps convert C++ code to R code
...declaration) and th end exporting the output to a file ( like write.table() or sink() )
Thank you...
#include <iostream>
#include <math.h>#include <fstream.h>#include <time.h>
#define IA 16807#define IM 2147483647#define AM (1.0/IM)#define IQ 127773
#define IR 2836#define NTAB 32#define NDIV (1+(IM-1)/NTAB)#define EPS 1.2*pow(10,-7)#define RNMX (1.0-EPS)
using namespace std;float rand1(long *idum);
int main(){ long run=10000,adr=-run,x,y,hapa=0,i=0; int dimx=700,dimy=700,nrg=50, M[dimx][dimy]; double rnd,sum=0; long k[run+1],frekuenca;
bool njehsuar[run+1], next; ofstr...
2004 Jul 21
0
loglin( tab, margin, start = bad.start ) kills R (PR#7123)
...r in switch(z$ifault, stop("This should not happen"), stop("This
should not happen"), :
Incorrect specification of 'table' or 'start'
appl/loglin.c assumes that start (aka 'fit') has enough memory allocated.
Possible fix in stats/R/loglin.R :
ntab <- length(table)
+ nstart <- length( start )
+ if (nstart != ntab ) stop(" start and table must be same length " )
> version
_
platform sparc-unknown-linux-gnu
arch sparc
os linux-gnu
system sparc, lin...
2015 Oct 22
0
C_LogLin (stats/loglin)
...]
> if (is.character(tmp)) {
> ## Rewrite margin names to numbers
> tmp <- match(tmp, varnames)
> margin[[k]] <- tmp
> }
> conf[seq_along(tmp), k] <- tmp
> nmar <- nmar + prod(dtab[tmp])
> }
> ntab <- length(table)
> if (length(start) != ntab ) stop("'start' and 'table' must be same length")
> z <- .Call(C_LogLin, dtab, conf, table, start, nmar, eps, iter)
> ...
>
>
> --
> Kai Nitschke, Dipl.-Psych.
>
> Division of Functional Brain Im...
2003 Jul 15
2
printf and friends in R?
...%d#%.2f#%.2f%.4f\n", n,x1,x2,x3 )
which would output a line like
Case 10#3.21#7.65#0.4321
this particular case being a line in the right format for processing
by groff's 'tbl' table-formatter. In fact you could write the whole
table definition using printf:
printf(".TS\ntab(#);\nr n n n.\n"
for(i in (1:nrow(X))){
printf("Case %d#%.2f#%.2f%.4f\n", n,X[i,1],X[i,2],X[i,3] )
}
printf(".TE\n")
Other variants could be used for similar purposes.
(If something like this is not already around in R, I suppose it
wouldn't be too difficult...