简体   繁体   English

从大文件中抽取数据并在excel中导出此数据

[英]abstracting data from huge file and exporting this data in excel

I have a huge data file with genotypic data. 我有一个包含基因型数据的庞大数据文件。 I want to extract certain data and export this data in excel at once. 我想提取某些数据并立即在excel中导出这些数据。 When I am running the code for abstracting the data, R wants to put this data in the Console window and I am then getting error messages that there is not enough memory space. 当我运行抽象数据的代码时,R想要将这些数据放在控制台窗口中,然后我收到没有足够内存空间的错误消息。 Is there a way to tell R, not to put the extracted data in the Console window but export it instead in an excel file? 有没有办法告诉R,不是将提取的数据放在控制台窗口中,而是将其导出到excel文件中?

The code for abstracting the desired data is 抽象所需数据的代码是

subset(project, grepl("^UEBB018.*", pedigree_dhl) )

This is a follow-up to @joran's comment: 这是@joran评论的后续行动:

 subfile <- subset(project, grepl("^UEBB018.*", pedigree_dhl) )
 write.csv(subfile, file="outUEBB018.csv")

My memory is that you need to do this in two steps because the first argument to write.csv is not evaluated, but my memory on such details is not great. 我的记忆是你需要分两步完成这个步骤,因为write.csv的第一个参数没有被评估, 但我对这些细节的记忆并不好。 (I use the help files a lot.) Ben's comment below is correct. (我经常使用帮助文件。)下面的Ben的评论是正确的。 You can do it in one step. 你可以一步完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM