Replace individual IDs
Replace the individual IDs in an object with new ones
replace_ids(x, ids) ## S3 method for class 'cross2' replace_ids(x, ids) ## S3 method for class 'calc_genoprob' replace_ids(x, ids) ## S3 method for class 'viterbi' replace_ids(x, ids) ## S3 method for class 'sim_geno' replace_ids(x, ids)
x |
Object whose IDs will be replaced |
ids |
Vector of character strings with the new individual IDs, with the names being the original IDs. |
The input x
object, but with individual IDs replaced.
cross2
: Replace IDs in a "cross2"
object
calc_genoprob
: Replace IDs in output from calc_genoprob()
viterbi
: Replace IDs in output from viterbi()
sim_geno
: Replace IDs in output from sim_geno()
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2")) ids <- as.numeric(ind_ids(iron)) # replace the numeric IDs with IDs like "mouse003" new_ids <- setNames( sprintf("mouse%03d", as.numeric(ids)), ids) iron <- replace_ids(iron, new_ids)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.