Message-ID: <D16601E8-5F74-4BCD-BBCA-787A14AE7358@comcast.net>
Date: 2010-12-08T20:01:57Z
From: David Winsemius
Subject: read.table and factors
In-Reply-To: <AANLkTikZBhYMxjeBUQcbL47_RNH-P9fO7U7thrxsyQ6f@mail.gmail.com>
On Dec 8, 2010, at 2:40 PM, Erin Hodgess wrote:
> Dear R People:
>
> Suppose I have the following in a file:
>
> 1 1.171504 1.010070
> 2 -0.9317064 1.860900
> 3 -0.06522837 0.6561147
> 4 -1.817026 0.02619137
> 5 1.426983 0.5995691
> 6 -0.2844911 1.155561
> 7 -0.6920972 0.7633124
> 8 0.3129615 5.121108
>
> I want to use read.table to bring it in and I want the first column to
> be a factor. Is there a way to set up read.table such that the first
> column is a factor and the others are numeric, please?
?read.table # the colClasses argument
--
David Winsemius, MD
West Hartford, CT