Learn R Programming

gasper (version 1.1.6)

download_graph: Download Sparse Matrix form the SuiteSparse Matrix Collection

Description

download_graph allows to download sparse matrices from the SuiteSparse Matrix Collection.

Usage

download_graph(matrixname, groupname, svd = FALSE, add_info = FALSE)

Value

A list containing several components:

  • sA: A sparse matrix representation of the downloaded graph.

  • xy: Coordinates associated with the graph nodes (if available).

  • dim: A data frame with the number of rows, columns, and numerically nonzero elements.

  • temp: The path to the temporary directory where the matrix and downloaded files (including singular values if requested) are stored.

  • info: Additional information about the graph (included when add_info is TRUE).

Arguments

matrixname

Name of the graph to download.

groupname

Name of the group that provides the graph.

svd

Logical, if TRUE, a ".mat" file containing the singular values of the matrix is downloaded (if available). Default is FALSE.

add_info

Logical, if TRUE, additional information about the graph will be fetched and included in the output. Default is FALSE.

Details

download_graph automatically converts the downloaded matrix into a sparse matrix format. If coordinates are associated with the graphs, they are downloaded and included in the output. Visit https://sparse.tamu.edu/ or see SuiteSparseData to explore groups and matrix names.

References

Davis, T. A., & Hu, Y. (2011). The University of Florida sparse matrix collection. ACM Transactions on Mathematical Software (TOMS), 38(1), 1-25.

Kolodziej, S. P., Aznaveh, M., Bullock, M., David, J., Davis, T. A., Henderson, M., Hu, Y., & Sandstrom, R. (2019). The suitesparse matrix collection website interface. Journal of Open Source Software, 4(35), 1244.

See Also

get_graph_info, SuiteSparseData

Examples

Run this code
if (FALSE) {
matrixname <- "grid1"
groupname <- "AG-Monien"
download_graph(matrixname,groupname)
list.files(grid1$temp)
}

Run the code above in your browser using DataLab