r语言随机分组createDataPartition 提示错误: `i` must have one dimension, not 2.

图片说明
r语言随机分组createDataPartition
提示错误: i must have one dimension, not 2.
求问怎么解决啊