r-bigmemory

Element-wise mean of several big.matrix objects in R

狂风中的少年 提交于 2019-12-07 13:55:03
问题 I have 17 filebacked big.matrix objects (dim 10985 x 52598, 4.3GB each) of which I would like to calculate the element-wise mean. The result can be stored in another big.matrix (gcm.res.outputM). biganalytics::apply() doesn't work as the MARGIN can be set to 1 OR 2 only. I tried to use 2 for loops as shown here gcm.res.outputM <- filebacked.big.matrix(10958, 52598, separated = FALSE, backingfile = "gcm.res.outputM.bin", backingpath = NULL, descriptorfile = "gcm.res.outputM.desc",

How to install BigMemory and bigrf on windows OS

一笑奈何 提交于 2019-12-07 05:49:35
问题 I have been trying to install bigmemory on my R installation. My OS is windows 7 64 bit and I have tried it on R V2.15.1,2.15.2 and 3.0.1 64 bit but I cant get it to work. I have tried several options download the current source and run the command in R v3.0.1 install.packages("D:/Downloads/bigmemory_4.4.3.tar.gz", repos = NULL, type="source") but this gives an error "ERROR: Unix-only package" download older sources and run a similar commands, in the various installations of R V2 V3 etc, This

R: distm with Big Memory

余生颓废 提交于 2019-12-06 21:39:29
I am trying to use bigmemory in R to compute distance matrices for more than 100,00,000 (rough estimate) rows and 16 columns A small subset of the data looks like this list1 <- data.frame(longitude = c(80.15998, 72.89125, 77.65032, 77.60599, 72.88120, 76.65460, 72.88232, 77.49186, 72.82228, 72.88871), latitude = c(12.90524, 19.08120, 12.97238, 12.90927, 19.08225, 12.81447, 19.08241, 13.00984, 18.99347, 19.07990)) list2 <- data.frame(longitude = c(72.89537, 77.65094, 73.95325, 72.96746, 77.65058, 77.66715, 77.64214, 77.58415, 77.76180, 76.65460), latitude = c(19.07726, 13.03902, 18.50330, 19

operating with big.matrix

笑着哭i 提交于 2019-12-06 11:20:49
I have to work with big.matrix objects and I can’t compute some functions. Let's consider the following big.matrix: # create big.matrix object x <- as.big.matrix( matrix( sample(1:10, 20, replace=TRUE), 5, 4, dimnames=list( NULL, c("a", "b", "c", "d")) ) ) > x An object of class "big.matrix" Slot "address": <pointer: 0x00000000141beee0> The corresponding matrix object is: # create matrix object x2<-x[,] > x2 a b c d [1,] 6 9 5 3 [2,] 3 6 10 8 [3,] 7 1 2 8 [4,] 7 8 4 10 [5,] 6 3 6 4 If I compute this operations with the matrix object, it works: sqrt(slam::col_sums(x2*x2)) > sqrt(slam::col_sums

Element-wise mean of several big.matrix objects in R

与世无争的帅哥 提交于 2019-12-05 21:36:35
I have 17 filebacked big.matrix objects (dim 10985 x 52598, 4.3GB each) of which I would like to calculate the element-wise mean. The result can be stored in another big.matrix (gcm.res.outputM). biganalytics::apply() doesn't work as the MARGIN can be set to 1 OR 2 only. I tried to use 2 for loops as shown here gcm.res.outputM <- filebacked.big.matrix(10958, 52598, separated = FALSE, backingfile = "gcm.res.outputM.bin", backingpath = NULL, descriptorfile = "gcm.res.outputM.desc", binarydescriptor = FALSE) for(i in 1:10958){ for(j in 1:52598){ t <- rbind(gcm.res.output1[i,j], gcm.res.output2[i

R: Distm for big data? Calculating minimum distances between two matrices

别说谁变了你拦得住时间么 提交于 2019-12-05 20:18:21
I have two matrices, one is 200K rows long, the other is 20K. For each row (which is a point) in the first matrix, I am trying to find which row (also a point) in the second matrix is closest to the point in the first matrix. This is the first method that I tried on a sample dataset: #Test dataset pixels.latlon=cbind(runif(200000,min=-180, max=-120), runif(200000, min=50, max=85)) grwl.latlon=cbind(runif(20000,min=-180, max=-120), runif(20000, min=50, max=85)) #calculate the distance matrix library(geosphere) dist.matrix=distm(pixels.latlon, grwl.latlon, fun=distHaversine) #Pick out the

How to install BigMemory and bigrf on windows OS

天大地大妈咪最大 提交于 2019-12-05 11:06:18
I have been trying to install bigmemory on my R installation. My OS is windows 7 64 bit and I have tried it on R V2.15.1,2.15.2 and 3.0.1 64 bit but I cant get it to work. I have tried several options download the current source and run the command in R v3.0.1 install.packages("D:/Downloads/bigmemory_4.4.3.tar.gz", repos = NULL, type="source") but this gives an error "ERROR: Unix-only package" download older sources and run a similar commands, in the various installations of R V2 V3 etc, This gives me an error "ERROR: configuration failed for package 'bigmemory'" Any ideas? I am actually

Computing the null space of a bigmatrix in R

你说的曾经没有我的故事 提交于 2019-12-04 23:26:25
I can not find any function or package to calculate the null space or (QR decomposition) of a bigmatrix (from library(bigmemory) ) in R. For example: library(bigmemory) a <- big.matrix(1000000, 1000, type='double', init=0) I tried the following but got the errors shown. How can I find the null space of a bigmemory object? a.qr <- Matrix::qr(a) # Error in as.vector(data) : # no method for coercing this S4 class to a vector q.null <- MASS::Null(a) # Error in as.vector(data) : # no method for coercing this S4 class to a vector If you want to compute the full SVD of the matrix, you can use package

Package bigmemory not installing on R 64 3.0.2 [duplicate]

江枫思渺然 提交于 2019-12-04 20:23:35
This question already has answers here : How should I deal with “package 'xxx' is not available (for R version x.y.z)” warning? (15 answers) Closed 5 years ago . I am trying to install the bigmemory package in R 64 version 3.0.2 on Windows. I get the following error: install.packages('bigmemory') Installing package into ‘C:/Users/Audrey/Documents/R/win-library/3.0’(as ‘lib’ is unspecified) Warning message: package ‘bigmemory’ is not available (for R version 3.0.2) > library(bigmemory) Error in library(bigmemory) : there is no package called ‘bigmemory’ Any help or insight will be much

Still struggling with handling large data set

你说的曾经没有我的故事 提交于 2019-12-02 02:13:56
问题 I have been reading around on this website and haven't been able to find the exact answer. If it already exists, I apologize for the repost. I am working with data sets that are extremely large (600 million rows, 64 columns on a computer with 32 GB of RAM). I really only need much smaller subsets of this data, but am struggling to perform any functions besides simply importing one data set in with fread, and selecting the 5 columns I need. After that, I try to overwrite my dataset with the