如何将一个CSV文件中的列值从文件中的某个点附加到另一个CSV文件中

时间:2022-12-11 13:53:51

I have two files 1. Cleaned.csv, columns: SVM_LABEL, text( having 1:499 training data, 500:650 test data) 2. result.csv, columns:SVM_LABEL, SVM_PROB( SVM_LABEL for test data)

我有两个文件1。清洁。csv,列:SVM_LABEL, text(有1:499培训数据,500:650测试数据)结果。csv,列:SVM_LABEL, SVM_PROB(测试数据的SVM_LABEL)

I want to append the SVM_LABEL obtained in result.csv to Cleaned.csv from 500th row. How can i do that in R? Any suggestion will be of great help!

我想添加在结果中获得的SVM_LABEL。csv清洗。csv从第500行。怎么用R表示呢?任何建议都将大有帮助!

1 个解决方案

#1


0  

You can subset data in your merge, using your example specifically:

您可以在合并中对数据进行子集划分,具体使用示例:

 newdata=merge(cleaned[500:nrow(cleaned),],result,by='SVM_LABEL')

#1


0  

You can subset data in your merge, using your example specifically:

您可以在合并中对数据进行子集划分,具体使用示例:

 newdata=merge(cleaned[500:nrow(cleaned),],result,by='SVM_LABEL')