On 29/08/13 12:10, Ista Zahn wrote:
On Wed, Aug 28, 2013 at 7:44 PM, Steve Lianoglou
lianoglou.st...@gene.com wrote:
Hi,
On Wed, Aug 28, 2013 at 3:58 PM, Ista Zahn istaz...@gmail.com wrote:
Or go all the way and put
options(stringsAsFactors = FALSE)
at the top your script or in your
Hi,
On Thu, Aug 29, 2013 at 3:03 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote:
On 29/08/13 12:10, Ista Zahn wrote:
On Wed, Aug 28, 2013 at 7:44 PM, Steve Lianoglou
lianoglou.st...@gene.com wrote:
Hi,
On Wed, Aug 28, 2013 at 3:58 PM, Ista Zahn istaz...@gmail.com wrote:
Or go all the way
I have a table, and I want a new column to add some annotations to.
But it ends up as a factor instead of characters, and won't let me add
arbitrary text.
data(iris)
iris-data.frame(iris,annot=c())
iris[1,annot]-annotation
Warning message:
In `[-.factor`(`*tmp*`, iseq, value = annotation) :
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Ed Siefker
Sent: Wednesday, August 28, 2013 1:57 PM
To: r-help@r-project.org
Subject: [R] why is this a factor?
I have a table, and I want a new column to add some annotations
Hi Ed,
Because that's the default for data.frame(), and a lot of people trip
over it just as you did. It's an easy fix:
R data(iris)
R iris - data.frame(iris, annot=c(), stringsAsFactors=FALSE)
R iris[1,annot]-annotation
Thanks for the very useful reproducible example.
Sarah
On Wed, Aug 28,
-help@r-project.org
Cc:
Sent: Wednesday, August 28, 2013 4:56 PM
Subject: [R] why is this a factor?
I have a table, and I want a new column to add some annotations to.
But it ends up as a factor instead of characters, and won't let me add
arbitrary text.
data(iris)
iris-data.frame(iris,annot=c
...@gmail.com
To: r-help@r-project.org
Cc:
Sent: Wednesday, August 28, 2013 4:56 PM
Subject: [R] why is this a factor?
I have a table, and I want a new column to add some annotations to.
But it ends up as a factor instead of characters, and won't let me add
arbitrary text.
data(iris)
iris
Hi,
On Wed, Aug 28, 2013 at 3:58 PM, Ista Zahn istaz...@gmail.com wrote:
Or go all the way and put
options(stringsAsFactors = FALSE)
at the top your script or in your .Rprofile. This will prevent this
kind of annoyance in the future without having to say stringsAsFactors
= FALSE all the
8 matches
Mail list logo