[R] i'm so stuck with text file and contour plot
dwinsemius at comcast.net
Wed Aug 5 15:23:55 CEST 2009
Doubtful. The OP did have spaces in his header. but by specifying that
only tabs should be used as delimiters the default parameters to both
read.table and read.csv would have converted the spaces to periods.
On Aug 5, 2009, at 9:16 AM, Tal Galili wrote:
> Hi Hannes,
>> From my experience, this error usually happens when you've got
>> spaces in the
> header row, in the column names.
> An easy solution would be to open the file in excel, then run
> search-and-replace on the header row for all spaces and replace them
> with a
> hyphen "-".
> Hope it helped (please let us know if it did)
> With kind regards,
> On Wed, Aug 5, 2009 at 12:09 PM, hannesPretorius <talk2hannes at gmail.com
>> When I read the entire text file in I get the following message
>>> x <- read.table('c:/small.txt', sep='\t', header=TRUE)
>> Warning message:
>> number of items read is not a multiple of the number of columns.
>> hannesPretorius wrote:
>>> Ok i feel pretty stupid.. been trying to read a text file that
>>> heading in the first line in to R but cant. all i need to do is
>>> make a
>>> contour plot for a friend but after weeks i feel like giving up.. i
>>> included the first few lines of the file.. any help will be great
>>> Hannes http://www.nabble.com/file/p24777697/small.txt small.txt
>> View this message in context:
>> Sent from the R help mailing list archive at Nabble.com.
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> My contact information:
> Tal Galili
> Phone number: 972-50-3373767
> FaceBook: Tal Galili
> My Blogs:
> [[alternative HTML version deleted]]
> 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.
David Winsemius, MD
West Hartford, CT
More information about the R-help