View source: R/fread_csv_numer.R
fread_csv_numer | R Documentation |
Read a csv file via data.table::fread()
using a
particular set of options, including the ability to transpose the
result. This version assumes that the contents other than the first
column and the header row are strictly numeric.
fread_csv_numer(
filename,
sep = ",",
na.strings = c("NA", "-"),
comment.char = "#",
transpose = FALSE,
rownames_included = TRUE
)
filename |
Name of input file |
sep |
Field separator |
na.strings |
Missing value codes |
comment.char |
Comment character; rest of line after this character is ignored |
transpose |
If TRUE, transpose the result |
rownames_included |
If TRUE, the first column is taken to be row names. |
Initial two lines can contain comments with number of rows and columns. Number of columns includes an ID column; number of rows does not include the header row.
The first column is taken to be a set of row names
Data frame
fread_csv()
## Not run: mydata <- fread_csv_numer("myfile.csv", transpose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.