Description Usage Arguments Value See Also Examples
Read a matrix of values from a csv sheet and sort them into a tibble. You
can name the values and encode several additional properties into the name,
which be split into several columns. Please refer to the vignette
(browseVignettes("roxygen2")
) and examples below for in-depth explanation
and the whys and hows.
1 2 3 |
file_name |
Name of the file from which to read the data. May contain "#NUM#" as a placeholder if you have multiple files. |
path |
The path to the file (no trailing "/" or "\" !). |
num |
Number of the set to read, inserted for "#NUM#". |
sep |
Separator used in the csv-file, either "," or ";" (see
|
dec |
The character used for decimal points (see |
cols |
Number of columns in the input matrix ( |
rows |
Number of rows containing values (not names / additional data)
in the input matrix ( |
additional_vars |
Vector of strings containing the names for the additional columns. |
additional_sep |
String / RegExp that separates additional vars, e.g.:
|
A tibble containing (at minimum) set
, position
, sample_id
,
name
and value
.
Other set functions: set_calc_concentrations
,
set_calc_variability
,
sets_read
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | # a file containing only values
read.csv(
file = system.file("extdata", "values.csv", package = "bioset"),
header = FALSE,
colClasses = "character"
)
# read into a tibble
set_read(
file_name = "values_names.csv",
path = system.file("extdata", package = "bioset"),
)
# file containing names
read.csv(
file = system.file("extdata", "values_names.csv", package = "bioset"),
header = FALSE,
colClasses = "character"
)
# read a file containing labels and store those in column "name"
set_read(
file_name = "values_names.csv",
path = system.file("extdata", package = "bioset"),
additional_vars = c("name")
)
# file with names and properties
read.csv(
file = system.file(
"extdata", "values_names_properties.csv", package = "bioset"),
header = FALSE,
colClasses = "character"
)
# read a file containing labels and properties and store those in columns
# "name" and "time"
# splits names by every character that's not A-Z, a-z, 0-9
# to change that behaviour use additional_sep
set_read(
file_name = "values_names_properties.csv",
path = system.file("extdata", package = "bioset"),
additional_vars = c("name", "time")
)
# read file "set_1.csv" containing labels
set_read(
num = 1,
path = system.file("extdata", package = "bioset"),
additional_vars = c("name", "time")
)
# read file "set_2.csv" containing labels
set_read(
num = 2,
path = system.file("extdata", package = "bioset"),
additional_vars = c("name", "time")
)
# read file "plate_2.csv" containing labels
set_read(
num = 2,
file_name = "plate_#NUM#.csv",
path = system.file("extdata", package = "bioset"),
additional_vars = c("name", "time")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.