Re: [R] Converting Factor to Vector

2009-01-13 Thread Patrick Burns
p-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gundala Viswanath Sent: Tuesday, 13 January 2009 3:25 PM To: r-h...@stat.math.ethz.ch Subject: [R] Converting Factor to Vector Hi all, How can I convert factor like this: str(repo) 'data.frame': 10

Re: [R] Converting Factor to Vector

2009-01-12 Thread David Winsemius
..@r-project.org ] On Behalf Of Gundala Viswanath Sent: Tuesday, 13 January 2009 3:25 PM To: r-h...@stat.math.ethz.ch Subject: [R] Converting Factor to Vector Hi all, How can I convert factor like this: str(repo) 'data.frame': 1000 obs. of 1 variable: $ AAA: Factor w/ 1000 levels

Re: [R] Converting Factor to Vector

2009-01-12 Thread Gundala Viswanath
> as.character() > > > Bill Venables > http://www.cmis.csiro.au/bill.venables/ > > > -Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Gundala Viswanath > Sent: Tuesday, 13 January 2009 3:25 PM > To: r

Re: [R] Converting Factor to Vector

2009-01-12 Thread Bill.Venables
Factor to Vector Hi all, How can I convert factor like this: > str(repo) 'data.frame': 1000 obs. of 1 variable: $ AAA: Factor w/ 1000 levels "AAT","AAC",..: 1 2 3 4 5 6 7 8 9 10 ... > print(repo) AAA 1 AAA 2 AAT 3 AAC ... into to simple vector &g

[R] Converting Factor to Vector

2009-01-12 Thread Gundala Viswanath
Hi all, How can I convert factor like this: > str(repo) 'data.frame': 1000 obs. of 1 variable: $ AAA: Factor w/ 1000 levels "AAT","AAC",..: 1 2 3 4 5 6 7 8 9 10 ... > print(repo) AAA 1 AAA 2 AAT 3 AAC ... into to simple vector > str(new_repo) chr [1:100] "AAA" "AAT" "AAC" "AAG" "ATA" "AT