[R] Simple numeric as.is question

2004-03-15 Thread Janet Gannon
I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use as.is, but the specifics escape me. I have used x-read.table(clipboard, header=F) to import from a txt file. How

RE: [R] Simple numeric as.is question

2004-03-15 Thread Liaw, Andy
If read.table() is not recognizing the data as numeric, there's probably something in the content that confused read.table(). You can try using x - scan(clipboard) instead and see if and how it chokes. Andy From: Janet Gannon I am reading a list of numbers from my clipboard, and have

RE: [R] Simple numeric as.is question

2004-03-15 Thread Andy Bunn
Look at the help for: ?as.numeric HTH, Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Janet Gannon Sent: Monday, March 15, 2004 7:04 AM To: [EMAIL PROTECTED] Subject: [R] Simple numeric as.is question I am reading a list of numbers from

Re: [R] Simple numeric as.is question

2004-03-15 Thread Tom Blackwell
Janet - Try x2 - as.numeric(as.character(x)) hist(x2) I'm not a Windows user, so I can't test this before sending. It might solve the problem, might not. (Flame !! : This is just ONE MORE example of the difficulties caused by the default behavior of read.table() to make things into

Re: [R] Simple numeric as.is question

2004-03-15 Thread Sundar Dorai-Raj
Janet Gannon wrote: I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use as.is, but the specifics escape me. I have used x-read.table(clipboard, header=F) to import

Re: [R] Simple numeric as.is question

2004-03-15 Thread Timur Elzhov
On Mon, Mar 15, 2004 at 09:04:05AM -0500, Janet Gannon wrote: I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use as.is, but the specifics escape me. I have used

Re: [R] Simple numeric as.is question

2004-03-15 Thread Peter Dalgaard
Timur Elzhov [EMAIL PROTECTED] writes: On Mon, Mar 15, 2004 at 09:04:05AM -0500, Janet Gannon wrote: I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use as.is,

Re: [R] Simple numeric as.is question

2004-03-15 Thread Thomas Petzoldt
Janet Gannon wrote: I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use as.is, but the specifics escape me. I have used x-read.table(clipboard, header=F) to import from

Re: [R] Simple numeric as.is question

2004-03-15 Thread Uwe Ligges
Janet Gannon wrote: I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use as.is, but the specifics escape me. I have used x-read.table(clipboard, header=F) to import from

RE: [R] Simple numeric as.is question

2004-03-15 Thread Liaw, Andy
From: Peter Dalgaard Sent: Monday, March 15, 2004 3:51 PM To: Timur Elzhov Cc: [EMAIL PROTECTED]; Janet Gannon Subject: Re: [R] Simple numeric as.is question Timur Elzhov [EMAIL PROTECTED] writes: On Mon, Mar 15, 2004 at 09:04:05AM -0500, Janet Gannon wrote: I am reading a list

RE: [R] Simple numeric as.is question

2004-03-15 Thread Prof Brian Ripley
:[EMAIL PROTECTED] On Behalf Of Janet Gannon Sent: Monday, March 15, 2004 7:04 AM To: [EMAIL PROTECTED] Subject: [R] Simple numeric as.is question I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my

Re: [R] Simple numeric as.is question

2004-03-15 Thread Prof Brian Ripley
On Mon, 15 Mar 2004, Tom Blackwell wrote: Try x2 - as.numeric(as.character(x)) hist(x2) I'm not a Windows user, so I can't test this before sending. It might solve the problem, might not. (Flame !! : This is just ONE MORE example of the difficulties caused by the default behavior