[datatable-help] problem with reading a .csv file with read.table
Christoph Jäckel
christoph.jaeckel at wi.tum.de
Thu Jan 19 15:46:19 CET 2012
Hi,
you are on the wrong help-list. This list is meant for problems regarding
the data.table package, which is just one R package:
http://datatable.r-forge.r-project.org/
So where you actually want to post is the R help-list:
https://stat.ethz.ch/mailman/listinfo/r-help
Having said that, before you post your problem there I would play a little
bit more with the read-functions in R. From your input, it looks as if you
have a CSV-file in European format. So try read.csv2("file.csv") for a
start. If that doesn't work, repost your problem to the R-help list and do
provide as many information as possible (does any of your cells contain
special characters? does any column contain a semicolon in the names? etc.)
HTH
Christoph
On Thu, Jan 19, 2012 at 3:20 PM, aaurouss <antoine.aurousseau at gmail.com>wrote:
> Hello,
>
> Here's my problem :
>
> I have a csv file which I have to read with read.table() function (or
> read.csv). The file has about 60000 lines whose data are written this way:
> character;character;character;character
>
> 14/10/2010 13:10;0;49;0;49;
>
> 14/10/2010 13:20;0;49;0;49;
>
> 14/10/2010 13:30;0;49;0;49;
>
> 14/10/2010 13:40;0;48;0;48;
>
> 14/10/2010 13:50;0;46;0;46;
>
>
> I tried to use the function this way: read.csv("file.csv",sep =
> ";",colClasses = "character", fill="TRUE",as.is=TRUE,h=FALSE).
>
> Here's what I get as an error:
> Error in fill && length(col.names) > cols :
> type 'x' incorrect in 'x && y'
>
> I can't find any set of options with any of the read functions that work.
>
> Any ideas ?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/problem-with-reading-a-csv-file-with-read-table-tp4310126p4310126.html
> Sent from the datatable-help mailing list archive at Nabble.com.
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>
--
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Christoph Jäckel (Dipl.-Kfm.)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Research Assistant
Chair for Financial Management and Capital Markets | Lehrstuhl für
Finanzmanagement und Kapitalmärkte
TUM School of Management | Technische Universität München
Arcisstr. 21 | D-80333 München | Germany
Mailto: christoph.jaeckel at wi.tum.de | Web: www.fm.wi.tum.de
Phone: +49 89 289 25487 | Fax: +49 89 289 25488
Head of Chair:
Univ.-Prof. Dr. Christoph Kaserer
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
E-Mail Disclaimer
Der Inhalt dieser E-Mail ist vertraulich und ausschliesslich
fuer den bezeichneten Adressaten bestimmt. Wenn Sie nicht
der vorgesehene Adressat dieser E-Mail oder dessen Vertreter
sein sollten, so beachten Sie bitte, dass jede Form der
Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder
Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir
bitten Sie, sich in diesem Fall mit dem Absender der E-Mail
in Verbindung zu setzen.
The information contained in this email is confidential. It is
intended solely for the addressee. Access to this email by
anyone else is unauthorized if you are not the intended
recipient, any form of disclosure, reproduction, distribution
or any action taken or refrained from in reliance on it, is
prohibited and may be unlawful. Please notify the sender
immediately.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20120119/0fb71b41/attachment.htm>
More information about the datatable-help
mailing list