
Last chance! 50% off unlimited learning
Sale ends in
Swap a block of rows of a dataset between two lists variables (typically twin 1 and twin2)
umx_swap_a_block(theData, rowSelector, T1Names, T2Names)
a data frame to swap within
rows to swap amongst columns
the first set of columns
the second set of columns
- dataframe
- subset
Other Data Functions: umxCovData
,
umxFactor
, umxHetCor
,
umxPadAndPruneForDefVars
,
umx_as_numeric
,
umx_cont_2_quantiles
,
umx_cov2raw
, umx_long2wide
,
umx_lower2full
,
umx_make_MR_data
,
umx_make_TwinData
,
umx_make_bin_cont_pair_data
,
umx_make_fake_data
,
umx_merge_CIs
,
umx_read_lower
, umx_reorder
,
umx_residualize
, umx_round
,
umx_scale_wide_twin_data
,
umx_scale
, umx_wide2long
,
umx
# NOT RUN {
test = data.frame(
a = paste0("a", 1:10),
b = paste0("b", 1:10),
c = paste0("c", 1:10),
d = paste0("d", 1:10), stringsAsFactors = FALSE)
umx_swap_a_block(test, rowSelector = c(1,2,3,6), T1Names = "b", T2Names = "c")
umx_swap_a_block(test, rowSelector = c(1,2,3,6), T1Names = c("a","c"), T2Names = c("b","d"))
# }
Run the code above in your browser using DataLab