bigstatsr | R package for statistical tools | Data Visualization library
kandi X-RAY | bigstatsr Summary
kandi X-RAY | bigstatsr Summary
R package {bigstatsr} provides functions for fast statistical analysis of large-scale data encoded as matrices. The package can handle matrices that are too large to fit in memory thanks to memory-mapping to binary files on disk. This is very similar to the format big.matrix provided by R package {bigmemory}, which is no longer used by this package (see the corresponding vignette). As inputs, package {bigstatsr} uses Filebacked Big Matrices (FBM).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bigstatsr
bigstatsr Key Features
bigstatsr Examples and Code Snippets
Community Discussions
Trending Discussions on bigstatsr
QUESTION
I am trying to Apply foreach loop in R for one of my projects since for loop takes very long for output. The problem is foreach loops doesn't update memory and returns NA value. I found that this can be ruled out while creating matrix using the FBM function of bigstatsr package of R, but I have a code that deals with arrays and not 2D matrices. here is the code
...ANSWER
Answered 2021-Jul-17 at 05:39I guess the part taking time is fitting the models.
So you can always return list(jj, r, ft[,jj,,r])
(or even just ft[,jj,,r]
) and fill the array later.
QUESTION
I'm a newbie to the bigstatsr package. I have a sqlite database which I want to convert to an FBM matrix of 40k rows (genes) 60K columns (samples) for later consumption. I found examples of how to populate the matrix with random values but I'm not sure of what would be the best way to populate it with values from my sqlite database.
Currently I do it sequentially, here's some mock code:
...ANSWER
Answered 2021-Mar-04 at 06:17That is a very good first try that you have by yourself.
What is inefficient here is to test for
dplyr::filter(sample == current_sample)
for every single sample. I would try to usematch()
first to get the indices. Then, what would be a bit inefficient is to populate each column individually. As you said, you could usebig_apply()
to do this by blocks.big_write()
is for writing the FBM to some text file (e.g. csv). What you want here is to useFBM()$save()
(second line of the example in the README), and then usebig_attach()
on the .rds file (next line of the README).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bigstatsr
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page