Transposing an XTable in RMarkdown

Could you edit the reproducible example, called a reprex with representative data?