Read Estimated Breeding Values (EBV) from Input File
readr_ebv.Rd
Given a result file containing EBV and possibly other information, the column with AnimalID and with EBV are extracted and returned as a two column result tibble. The result tibble contains the AnimalID in the first column and the EBV in the second column.
Usage
readr_ebv(
ps_path,
ps_format,
ps_delim_char = " ",
ps_animal_col_name = NULL,
pn_animal_col_idx = 1,
ps_ebv_col_name = NULL,
pn_ebv_col_idx = NULL
)
Arguments
- ps_path
path to the EBV input file
- ps_format
format of the EBV input file, can be either of "csv", "csv2", "delim" or "table"
- ps_delim_char
column delimiting character for format "delim"
- ps_animal_col_name
column name for animal ID column
- pn_animal_col_idx
column index for animal ID column
- ps_ebv_col_name
column name for ebv column
- pn_ebv_col_idx
column index for ebv column
Details
The EBV input file can be in different formats. Possible formats that are considered can be "csv", "csv2", "delim", "table". Where each of these format specifiers point to the respective function from the `readr` package that is used for importing.
Examples
s_ebv_path_partial <- qzwslrm_example_solani("partial")
tbl_ebv <- readr_ebv(ps_path = s_ebv_path_partial, ps_format = "table")
#>
#> ── Column specification ────────────────────────────────────────────────────────
#> cols(
#> X1 = col_double(),
#> X2 = col_double(),
#> X3 = col_double(),
#> X4 = col_double(),
#> X5 = col_logical()
#> )
#> Warning: 1156 parsing failures.
#> row col expected actual file
#> 5 -- 5 columns 4 columns '/tmp/RtmpQ6Sl2w/temp_libpath1e0d2c67f2/qzwslrm/extdata/mix99/partial_data/Solani'
#> 7 -- 5 columns 4 columns '/tmp/RtmpQ6Sl2w/temp_libpath1e0d2c67f2/qzwslrm/extdata/mix99/partial_data/Solani'
#> 8 -- 5 columns 4 columns '/tmp/RtmpQ6Sl2w/temp_libpath1e0d2c67f2/qzwslrm/extdata/mix99/partial_data/Solani'
#> 9 -- 5 columns 4 columns '/tmp/RtmpQ6Sl2w/temp_libpath1e0d2c67f2/qzwslrm/extdata/mix99/partial_data/Solani'
#> 14 -- 5 columns 4 columns '/tmp/RtmpQ6Sl2w/temp_libpath1e0d2c67f2/qzwslrm/extdata/mix99/partial_data/Solani'
#> ... ... ......... ......... ..................................................................................
#> See problems(...) for more details.