我是big.matrix
和相关包的新手,我尝试重现以下示例```
Loading required package: stats
> Sys.setenv(LANG = "en")
> library(bigmemory)
Loading required package: bigmemory.sri
bigmemory >= 4.0 is a major revision since 3.1.2; please see package
biganalytics and http://www.bigmemory.org for more information.
> x <- big.matrix(5, 2, type="integer", init=0, dimnames=list(NULL, c("alpha", "beta")))
> x[,] <- round(rnorm(10))
Assignment will down cast from double to integer
Hint: To remove this warning type: options(bigmemory.typecast.warning=FALSE)
Mensajes de aviso perdidos
In SetAll.bm(x, value) :
> x
An object of class "big.matrix"
Slot "address":
<pointer: 0x22a1620>
> x[,]
alpha beta
[1,] -2 0
[2,] -1 0
[3,] 0 -1
[4,] 2 1
[5,] 0 0
> apply(x, 1, mean)
Error en as.vector(data) :
ningún método para coaccionar a esta clase S4 a un vector
来自文档,但最后一行给了我以下错误:
Error en as.vector(data) :
ningún método para coaccionar a esta clase S4 a un vector
最后一行说类似"there is no method for transform this S4 class to a vector"
你能给我指点一下吗?
我的 R 版本是
R.version
_
platform x86_64-unknown-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 2
minor 15.1
year 2012
month 06
day 22
svn rev 59600
language R
version.string R version 2.15.1 (2012-06-22)
nickname Roasted Marshmallows