简体   繁体   中英

Error while Replicating an ore.tblmatrix in R?

Actually, I'm trying to implement Multivaritate Gaussian distribution on a dataset from a data center. The data table NETWORK_DATA_TRAINING is stored in the Oracle database . But, when I tried to replicated the Matrix with columnwise means, it threw an error:

library(ORE)
library(pracma)
if (!ore.is.connected())
ore.connect("NETWORK_TBL01", "orcl","192.168.50.19", "test",port=1521, all=TRUE)

X <- NETWORK_DATA_TRAINING[,]
Mu <- colMeans(X)       # class(X) : "ore.frame" , dim(X): 1000 11  
Mu <- as.matrix(Mu)     #class(Mu) : "ore.tblmatrix", dim(Mu):1 11
k <- ncol(Mu)
mu <- matrix(Mu,ncol(X),nrow(X))

error: no method for coercing this S4 class to a vector

X <- bsxfun("-", X, mu)
print(X)

For more, here goes the link .

实际上,在强制转换为矩阵之前,我不得不使用转换表。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM