How to work with huge matrices in R? [closed] - r

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm working with huge dense matrices in R (Matrix package, Matrix data type) where one of my matrix exceeds the theoretical limit of an R matrix (it is supposed to be 58932 by 58932)
I need to conduct basic matrix operations such as add and multiply.
My question is: Is there a package in R or some other software which I can use to store these huge matrices as well as work with them.
Thank you in advance,

Try the class big.matrix in the CRAN package bigmemory.
http://www.stat.yale.edu/~mjk56/temp/bigmemory-vignette.pdf

I mainly use Windows, so bigmemory does not work for me.
I wrote my own package filematrix doing about the same with pure R code.
http://cran.r-project.org/web/packages/filematrix/index.html
I tested it on matrices over 1 TB in size.
Your 60,000 x 60,000 matrix should take only 28 GB as a file.
Happy to answer any questions about it.

Related

Is there an R function that can calculate the Integrated biomarker response (IBR) index? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Please can somebody help me with this, BENOIT BELIAEFF and THIERRY BURGEOT (2002) created the INTEGRATED BIOMARKER RESPONSE (IBR), however I did not find any tool for R that would help in this calculation, does anyone know any?
Did you know that actually that index was revisited by Devin et al. 2014 (DOI 10.1007/s11356-013-2169-9)? Try looking into it when you can!
But, about the R package: I was also having troubles finding one that actually does this type of calculation, and what I found was this new package called IBRtools
https://github.com/ecologicaltools/IBRtools
It contains a function called ibr_index that gives you a list of the index values and also the mean of the index values.
Furthermore, it also provides a function to graph your results, called ibr_chart, that creates a radarchart based on standardized values created by function ibr_std
I would definitely recommend looking into the package help section for further clarifications!

Is there an R package for working with very large graphs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm trying to find maxflow/mincut in a very large graph using R Language. I tried using RBGL package, which is a wrapper for some C library, so it's supposed to be much faster than pure-R packages, but I'm getting stuck on creating a graph object.
Creating graphAM object causes an error, that there's not enough memory to allocate vector of size 100Gb
Creating graphNEL object takes a very long time(waited over an hour and it still didn't finish).
In my graph I have only 154403 vertices and 618082 edges. Is there a package in R, that can efficiently work with this kind of graph and has necessary function to calculate maxflow/mincut?
I expect that it should create an object and calculate maxflow/mincut in around 5 minutes.
I've used igraph successfully with some big graphs, though its hard to predict if it will meet your 5 minute mark.
igraph has functions for max_flow (https://igraph.org/r/doc/max_flow.html) and mincut (https://igraph.org/r/doc/min_cut.html).

Group-based trajectory modelling in R [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 9 months ago.
Improve this question
I've been looking for a way to conduct group-based trajectory modeling in R with no avail. Something along the lines of what PROC TRAJ (http://www.andrew.cmu.edu/user/bjones/index.htm) accomplishes in SAS. Does anyone know of a similar package in R?
My outcome of interest (the model input) is categorical so i need something that can handle that.
The only package I've been able to find for this in R is crimCV. Here it is on Cran, and here is a working paper by the authors of the package on how it's done. I have not yet investigated this myself (and it seems like it hasn't been updated for years), but this page describes using it to fit a set of trajectories.

Glicko-2 implementation in R, where to find? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for an R implemention of the excellent Glicko-2 algorithm of Mark Glickman. Thusfar I found this one. Although this is a very nice piece of code I am particularly looking for a code that is able to deal with large data frames with match scores (meaning that it is capable of ranking all the players in the data frame in one go). A bit like the way the PlayerRatings package does the trick with e.g. Elo, Glicko. Unfortenately this package doesn't haven an implementation of the Glicko-2 algorithm.
Does anyone have an idea?
Glicko2 and few other algorithms are available in R package sport. Possible for two-player and multi-player matchups. Available on cran and github. Vignette included, standarized syntax, supported by C++.
Quick snippet
# install.packages("sport")
library(sport)
glicko2 <- glicko2_run(formula = rank|id ~ rider, data = gpheats)
# computation results
print(glicko2)
summary(glicko2)
tail(glicko2$r)
tail(glicko2$pairs)
If you had noticed the fine print at the bottom of Mark Glickman's page you would have seen (in tiny text admittedly)
PlayerRatings, an R package implementation of Glicko, as well as a
few other rating systems
with the link being: https://cran.r-project.org/web/packages/PlayerRatings/

glmnet algorithm in a different programming language [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm trying use linear regression with elastic net penalties for a mixed model. In the past I have used the R glmnet package with the penalty.factors parameter to accomplish this, but R is no longer an option for my project. I have found several implementations of elastic net in different languages, but none which allow for different penalty factors for each feature the way that the R glmnet package does.
Does a true translation of the R glmnet function exist in any other language? Thanks!
EDIT: Note that the R code is actually a wrapper of the FORTRAN code written for the R package. A few other wrappers exist in other languages, but I am looking for an new implementation of the full algorithm, not just an alternative wrapper. I want to be able to edit the code a bit, but I am not at all familiar with FORTRAN.
I would have put this in comments if I had enough points, but there is an implementation in Matlab, written by a few members of the team that wrote the original glmnet package:
http://web.stanford.edu/~hastie/glmnet_matlab/

Resources