[R] Importing files
jholtman at gmail.com
Sun Mar 18 22:59:58 CET 2012
You attachment never made it through. Try sending it as '.txt' file.
If the file is using both tabs and commas on the same line, then you
may have to use 'readLines' to read it in, and then 'strsplit' to
split out the different elements.
On Sun, Mar 18, 2012 at 4:13 PM, Santiago Guallar <sguallar at yahoo.com> wrote:
> I'm trying to import into R files that contain data downloaded from logger devices as files with the following formats:
> These files are essentially text files but use both tabs and commas as separators.
> I've tried the function scan:
> 1) scan("filename.act", what=character(0)) returns only two columns from the original 5
> 2) scan("copia.act", what=character(0),sep=",") returns three columns but puts the original fifth one in the next row
> Attached a sample file with five fields. How can I get one field per column?
> Thank you for your help
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
More information about the R-help