如何在R中导入大型csv或文本文件?

时间:2019-05-29 05:30:15

标签: r

如何在R中导入大型csv文件?

我的csv文件很大,但没有导入,而是显示错误

let regex = /(.*)\sCO\s?(\(.+\)|".+".*|'.+'.*|{.+}.*|\[.+\].*)/;

[pattern, match1, match2] = "3M CO 'A'(MINNESOTA MINING AND MANUFACTURING COMPANY)".match(regex);
console.log(match1 + " CO " + match2);
//3M CO 'A'(MINNESOTA MINING AND MANUFACTURING COMPANY)

[pattern, match1, match2] = '3M CO (A)(MINNESOTA MINING AND MANUFACTURING COMPANY)'.match(regex);
console.log(match1 + " CO " + match2);
//3M CO (A)(MINNESOTA MINING AND MANUFACTURING COMPANY)

[pattern, match1, match2] = '3M CO "A"(MINNESOTA MINING AND MANUFACTURING COMPANY)'.match(regex);
console.log(match1 + " CO " + match2);
//3M CO "A"(MINNESOTA MINING AND MANUFACTURING COMPANY)

[pattern, match1, match2] = "3M CO [A](MINNESOTA MINING AND MANUFACTURING COMPANY)".match(regex);
console.log(match1 + " CO " + match2);
//3M CO [A](MINNESOTA MINING AND MANUFACTURING COMPANY)

[pattern, match1, match2] = "3M CO {A}(MINNESOTA MINING AND MANUFACTURING COMPANY)".match(regex);
console.log(match1 + " CO " + match2);
//3M CO {A}(MINNESOTA MINING AND MANUFACTURING COMPANY)

我希望所有行和列都将导入到R

0 个答案:

没有答案