Windows or Excel to R txt file
0
0
Entering edit mode
boczniak767 ▴ 720
@maciej-jonczyk-3945
Last seen 29 days ago
Poland
> i am wondering whether there is a special need to "clean up" txt > files > that were created in windows or Excel before using them in R. > if so, how would you clean them? There are special package "foreign" which allows to read external data (such as xls). As for txt files (tab-delimited (?)), they could be read with read.table. If the file was created in Windows environment there could be problem with end of the line character (which are different in Win and Unix). I solve that just replacing "\r" and "\n" with "$" in bash (sed). HTH -- Maciej Jonczyk, Department of Plant Molecular Ecophysiology Faculty of Biology, University of Warsaw 02-096 Warsaw, Miecznikowa 1 Poland -- This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com
• 688 views
ADD COMMENT

Login before adding your answer.

Traffic: 946 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6