Skip to contents

Default file reading function in Rubrary functions because data is often in large tables and read.delim isn't optimized for high dimensionality. If file extension is xlsx, will attempt to use openxlsx::read.xlsx instead. Setting row.names != 0 will result in output being a data.frame.

Usage

rread(input, row.names = 0, make.names = TRUE, to_df = TRUE)

Arguments

input

string; fread input

row.names

integer; column to use as row names, 0 for none

make.names

logical; TRUE to ensure column names are unique and valid (replicating utils::read.table)

to_df

logical; T to convert output to data.frame

Value

Table read in from input

Examples

glab_Beltran_2016 <- "https://raw.githubusercontent.com/graeberlab-ucla/glab.library/master/vignettes/PCA_tutorial/Beltran_2016_rsem_genes_upper_norm_counts_coding_log2.txt"
df <- Rubrary::rread(glab_Beltran_2016, row.names = 1, to_df = FALSE)
Rubrary::corner(df, 5)
#>         WCMC90_2_C WCMC0_5_N WCMC210_1_N WCMC90_4_C WCMC172_1_C
#> A1BG      8.317177  9.081553    5.564872   7.694012    6.912446
#> A1CF      3.940270  7.809804    6.402112   3.554920    7.142071
#> A2M      15.581526 10.451833   11.921014  13.018555   10.855632
#> A2ML1    14.174641  3.518384    3.900017  14.368108    2.955852
#> A3GALT2   3.031307  3.256588    2.496437   0.000000    1.427445