有没有人知道在R中将整数向量转换为单个数字的方法,例如:
> x <- c(1,2,3) > x <- compress(x) > x [1] 123
哪里compress()会是某种函数来进行.我希望该值为x单个数字,因此我可以将其乘以加密密钥.
compress()
x
试试这个
x = 1:3 as.numeric(paste(x, collapse = "")) # 123