Commit 4bdd00ae authored by Antoine Lucas's avatar Antoine Lucas
Browse files

correct null affectation on dimnames(x)[[1]] <- null

parent fb9a191e
Mon Jan 22 2007: 0.7-3
* dimnames(x)[[1]] <- NULL seems not to be allowed anymore.
-> changes in acp.R acprob.R
Wed Jan 21 2007: 0.7-2
* correct package dependences
* minor changes in documentation
......
Package: amap
Version: 0.7-2
Version: 0.7-3
Date: 2007-01-21
Suggests: Biobase
Title: Another Multidimensional Analysis Package
......
......@@ -35,8 +35,10 @@ acp <- function(x,center=TRUE,reduce=TRUE,wI=rep(1,nrow(x)),wV=rep(1,ncol(x)))
V <- data.frame(V)
scores <- data.frame(scores)
dimnames(V)[[2]] <- paste("Comp",1:dim(x)[2])
dimnames(V)[[1]] <- dimnames(x)[[2]]
dimnames(scores)[[1]] <- dimnames(x)[[1]]
if(!is.null( dimnames(x)[[2]] ))
dimnames(V)[[1]] <- dimnames(x)[[2]]
if(!is.null(dimnames(x)[[1]]))
dimnames(scores)[[1]] <- dimnames(x)[[1]]
dimnames(scores)[[2]] <- paste("Comp",1:dim(x)[2])
##cmpr <- x %*% (sqrt(wV) * as.matrix(V))
......
......@@ -188,8 +188,10 @@ acpgen <- function(x,h1,h2,center=TRUE,reduce=TRUE,kernel="gaussien")
V <- data.frame(V)
scores <- data.frame(scores)
dimnames(V)[[2]] <- paste("Comp",1:dim(x)[2])
dimnames(V)[[1]] <- dimnames(x)[[2]]
dimnames(scores)[[1]] <- dimnames(x)[[1]]
if(!is.null( dimnames(x)[[2]] ))
dimnames(V)[[1]] <- dimnames(x)[[2]]
if(!is.null( dimnames(x)[[1]] ))
dimnames(scores)[[1]] <- dimnames(x)[[1]]
dimnames(scores)[[2]] <- paste("Comp",1:dim(x)[2])
eig <- sqrt(EIG$values)
sdev <- apply(scores,2,sd)
......@@ -217,8 +219,10 @@ acprob <- function(x,h=1,center=TRUE,reduce=TRUE,kernel="gaussien")
V <- data.frame(V)
scores <- data.frame(scores)
dimnames(V)[[2]] <- paste("Comp",1:dim(x)[2])
dimnames(V)[[1]] <- dimnames(x)[[2]]
dimnames(scores)[[1]] <- dimnames(x)[[1]]
if(!is.null( dimnames(x)[[2]] ))
dimnames(V)[[1]] <- dimnames(x)[[2]]
if(!is.null( dimnames(x)[[1]] ))
dimnames(scores)[[1]] <- dimnames(x)[[1]]
dimnames(scores)[[2]] <- paste("Comp",1:dim(x)[2])
sdev <- apply(scores,2,sd)
res <- list(eig=val,sdev=sdev,scores=scores,loadings=V)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment