View source: R/process_delim.R
process_delim | R Documentation |
A function to read in large data files as an FBM
process_delim(
data_dir,
data_file,
feature_id,
rds_dir = data_dir,
rds_prefix,
logfile = NULL,
overwrite = FALSE,
quiet = FALSE,
...
)
data_dir |
The directory to the file. |
data_file |
The file to be read in, without the filepath. This should be a file of numeric values.
Example: use |
feature_id |
A string specifying the column in the data X (the feature data) with the row IDs (e.g., identifiers for each row/sample/participant/, etc.). No duplicates allowed. |
rds_dir |
The directory where the user wants to create the '.rds' and '.bk' files
Defaults to |
rds_prefix |
String specifying the user's preferred filename for the to-be-created .rds file (will be create insie |
logfile |
Optional: the name (character string) of the prefix of the logfile to be written. Defaults to 'process_delim', i.e. you will get 'process_delim.log' as the outfile. |
overwrite |
Optional: the name (character string) of the prefix of the logfile to be written.
Defaults to 'process_plink', i.e. you will get 'process_plink.log' as the outfile.
Note: If there are multiple |
quiet |
Logical: should the messages printed to the console be silenced? Defaults to FALSE. |
... |
Optional: other arguments to be passed to |
The file path to the newly created '.rds' file
temp_dir <- tempdir()
colon_dat <- process_delim(data_file = "colon2.txt",
data_dir = find_example_data(parent = TRUE), overwrite = TRUE,
rds_dir = temp_dir, rds_prefix = "processed_colon2", sep = "\t", header = TRUE)
colon2 <- readRDS(colon_dat)
str(colon2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.