knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of qp4ewc is to provide information that is required as input for the program ECOWEIGHT in a uniform and easy to use way. The needed input is read from different sources is processed and then converted into the format that is required by ECOWEIGHT.
You can install the development version of qp4ewc from GitHub with:
# install.packages("devtools") devtools::install_github("sknqualitasag/qp4ewc")
This is a basic example which shows you how to solve a common problem:
library(qp4ewc) ## basic example code s_path_directory2create <- file.path(tempdir(),"qw4ewc","work") s_input_file_literature <- system.file("extdata","ewbc","input_literature.txt", package = "qp4ewc") s_input_file_par <- system.file("extdata","ewbc","input_par_statement.txt", package = "qp4ewc") s_input_file_calving_statement <- system.file("extdata","ewbc","input_calving_statement.txt", package = "qp4ewc") s_input_file_calving <- system.file("extdata","ewbc","test","test_zws_muku_gal.csv", package = "qp4ewc") s_start_date <- 20160101 s_end_date <- 20211231 s_input_file_progeny_flp_statement <- system.file("extdata","ewbc","input_flp_statement.txt", package = "qp4ewc") s_input_file_flp <- system.file("extdata","ewbc","test","test_zws_muku_flp.csv", package = "qp4ewc") s_input_file_flp_carcass_matrix_statement <- system.file("extdata","ewbc","input_flp_carcass_matrix_statement.txt", package = "qp4ewc") s_input_file_price_cow <- system.file("extdata","ewbc","cow_price.txt", package = "qp4ewc") s_input_file_price_bull <- system.file("extdata","ewbc","bull_price.txt", package = "qp4ewc") s_input_file_price_heifer <- system.file("extdata","ewbc","heifer_price.txt", package = "qp4ewc") s_input_file_testedbulls <- system.file("extdata", "ewbc", "input_testedbulls.txt", package = "qp4ewc") s_input_file_purchasedreplacementheifers <- system.file("extdata", "ewbc", "input_purchasedreplacementheifers.txt", package = "qp4ewc") pre_process_ewbc_input(ps_sirebreed = "LM", ps_prodsystew = "2", ps_marketchannel = "Natura-Beef", ps_path_directory2create = s_path_directory2create, ps_input_file_literature = s_input_file_literature, ps_input_file_par = s_input_file_par, ps_input_file_testedbulls = s_input_file_testedbulls, ps_input_file_purchasedreplacementheifers = s_input_file_purchasedreplacementheifers, ps_input_file_calving_statement = s_input_file_calving_statement, ps_input_file_calving = s_input_file_calving, ps_start_date = s_start_date, ps_end_date = s_end_date, ps_input_file_progeny_flp_statement = s_input_file_progeny_flp_statement, ps_input_file_flp = s_input_file_flp, ps_input_file_flp_carcass_matrix_statement = s_input_file_flp_carcass_matrix_statement, ps_input_file_price_cow = s_input_file_price_cow, ps_input_file_price_bull = s_input_file_price_bull, ps_input_file_price_heifer = s_input_file_price_heifer, pb_log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.