r-bigmemory

Computing the null space of a bigmatrix in R

会有一股神秘感。 提交于 2020-01-13 07:48:07
问题 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

RcppArmadillo + bigmemory crashes Windows RStudio (but no other GUI + OS.type)

我们两清 提交于 2019-12-24 00:57:10
问题 I'm working on an R package, bigKRLS. bigKRLS works on Windows RGui but encounters a fatal error on Windows RStudio. Some details... Windows RGui works but Windows RStudio encounters a fatal error; confirmed on four different machines using R 3.3.0, 3.3.1, 3.3.3; RTools 3.3 and 3.4 following the best practices recommended by the Coatless Professor; RStudio 1.0.136; Windows 7 and 8. Presently, bigKRLS works on RStudio for Mac OS X Yosemite and Ubuntu 14.04 without issue. bigKRLS depends on

Example of bigmemory and friends with file backing

六眼飞鱼酱① 提交于 2019-12-19 08:01:18
问题 I am interested in exploring how R can handle data out-of-memory. I've found the bigmemory package and friends ( bigtabulate and biganalytics ), but was hoping that someone could point me to a worked out example that uses file backing with these packages. Any other out-of-memory tips would also be appreciated. 回答1: Charlie, just email Mike and Jay, they have a number of examples working around the ASA 'flights' database example from a year or two ago. Edit: In fact, the Documentation tab has

Big matrix and memory problems

て烟熏妆下的殇ゞ 提交于 2019-12-10 15:53:03
问题 I am working on a huge dataset and I would like to derive the distribution of a test statistic. Hence I need to do calculations with huge matrices (200000x200000) and as you might predict I have memory issues. More precisely I get the following: Error: cannot allocate vector of size ... Gb. I work on the 64-bit version of R and my RAM is 8Gb. I tried to use the package bigmemory but with not big success. The first issue comes when I have to calculate the distance matrix. I found this nice

R::bigmemory - how to create character big.matrix?

拟墨画扇 提交于 2019-12-10 14:16:47
问题 I try to use bigmemory package in R and I'm stuck in the very beginning. I do: temp <- matrix(paste("a",1:10), 5, 2) and get a character matrix. That's OK. But then I try: x <- as.big.matrix(temp, type="char") and I get a matrix full of NA and the following message: Assignment will down cast from double to char Hint: To remove this warning type: options(bigmemory.typecast.warning=FALSE) Warning messages: 1: In as.big.matrix(temp, type = "char") : Casting to numeric type 2: In matrix(as

operating with big.matrix

坚强是说给别人听的谎言 提交于 2019-12-10 10:43:52
问题 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

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

偶尔善良 提交于 2019-12-10 10:11:16
问题 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

Extracting a column with NA's from a bigmemory object in Rcpp

徘徊边缘 提交于 2019-12-08 12:15:12
问题 I'm trying to create a function that extracts a column from a big.matrix object in Rcpp (so that it can be analyzed in cpp before bringing the results to R), but I can't figure out how to get it to recognise NA's (they are now presented as -2147483648 - as shown in my minimal example below). It would be even better if I could access the function GetMatrixCols ( src/bigmemory.cpp ) straight from Rcpp, but I've yet to discover a way to do that. #include <Rcpp.h> // [[Rcpp::plugins(cpp11)]] // [

R: distm with Big Memory

人走茶凉 提交于 2019-12-08 05:14:02
问题 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

Reading big data in R by read.big.matrix

五迷三道 提交于 2019-12-08 02:13:28
问题 I am reading a data of dimension 3131875*5 in r using read.big.matrix . My data has both character and numeric columns including date variable. The command which I should use is as1 <- read.big.matrix("C:/Documents and Settings/Arundhati.Mukherjee/My Documents/Arundhati/big data/MB07_Arundhati/sample2.txt", header=TRUE, backingfile="session.bin", descriptorfile="session.desc", type = NA) But type = NA is not accepted in R in this case and I am getting an error: Error in filebacked.big.matrix