projects
/
valse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add 'fast' argument to select C code or R code
[valse.git]
/
pkg
/
R
/
EMGLLF.R
diff --git
a/pkg/R/EMGLLF.R
b/pkg/R/EMGLLF.R
index
0158914
..
1739204
100644
(file)
--- a/
pkg/R/EMGLLF.R
+++ b/
pkg/R/EMGLLF.R
@@
-28,7
+28,7
@@
EMGLLF <- function(phiInit, rhoInit, piInit, gamInit,
if (!fast)
{
# Function in R
if (!fast)
{
# Function in R
- return (EMGLLF_R(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau))
+ return (
.
EMGLLF_R(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau))
}
# Function in C
}
# Function in C
@@
-45,7
+45,7
@@
EMGLLF <- function(phiInit, rhoInit, piInit, gamInit,
}
# R version - slow but easy to read
}
# R version - slow but easy to read
-EMGLLF_R = function(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau)
+
.
EMGLLF_R = function(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau)
{
# Matrix dimensions
n = dim(X)[1]
{
# Matrix dimensions
n = dim(X)[1]