[Genabel-commits] r1793 - pkg/MixABEL/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Aug 10 17:29:12 CEST 2014
Author: lckarssen
Date: 2014-08-10 17:29:11 +0200 (Sun, 10 Aug 2014)
New Revision: 1793
Modified:
pkg/MixABEL/R/fgls.R
Log:
Fixed a few partial arguments in MixABEL's fgls.R code (found by R CMD check).
Modified: pkg/MixABEL/R/fgls.R
===================================================================
--- pkg/MixABEL/R/fgls.R 2014-08-10 15:25:14 UTC (rev 1792)
+++ pkg/MixABEL/R/fgls.R 2014-08-10 15:29:11 UTC (rev 1793)
@@ -112,7 +112,7 @@
rownames(betaW) <- colnames(X)
dimnames(V) <- list(colnames(X),colnames(X))
out <- list(beta=betaW,V=V,T2=T2,df=sum(whichtest),tested=whichtest,
- meanColX = apply(X,FUN=mean,MAR=2), n = dim(X)[1])
+ meanColX = apply(X,FUN=mean,MARGIN=2), n = dim(X)[1])
class(out) <- "FGLS"
out
}
@@ -134,7 +134,7 @@
#' @author Yurii Aulchenko
#'
summaryFGLS <- function(x,verbosity=1,varcov=FALSE,include.means=FALSE) {
- out <- c(x$n,x$T2,x$df,pchisq(x$T2,df=x$df,low=FALSE))
+ out <- c(x$n,x$T2,x$df,pchisq(x$T2,df=x$df,lower.tail=FALSE))
names(out) <- c("n","Chisq","df","P-value")
if (verbosity == 0) {
return(out)
@@ -435,7 +435,7 @@
if (nocalls > 0) {
if (na.SNP=="impute") {
- mn <- apply(GGG,MAR=2,FUN=mean,na.rm=TRUE)
+ mn <- apply(GGG,MARGIN=2,FUN=mean,na.rm=TRUE)
for (iii in 1:dim(GGG)[2]) GGG[is.na(GGG[,iii]),iii] <- mn[iii]
} else if (na.SNP == "drop") {
#stop("na.SNP != 'impute' and nocalls > 0; 'drop' not yet implemented")
@@ -546,7 +546,7 @@
vcoSeq <- as.vector(tmpMtr[lower.tri(tmpMtr)])
#print("before cbind")
out$FGLS <- cbind(outN,resIteratorNew[,1,drop=FALSE],
- outdf,pchisq(resIteratorNew[,1,drop=FALSE],df=outdf,low=FALSE),
+ outdf,pchisq(resIteratorNew[,1,drop=FALSE],df=outdf,lower.tail=FALSE),
resIteratorNew[,c(2:(1+nBeta)),drop=FALSE],
sqrt(resIteratorNew[,c((1+nBeta)+varSeq),drop=FALSE]),
resIteratorNew[,c((rIsize-nBeta+1):rIsize),drop=FALSE],
More information about the Genabel-commits
mailing list