Re: [R] For is.numeric condition in user input

2011-07-25 Thread jim holtman
>> From: jim holtman [jholt...@gmail.com] >> Sent: Monday, July 25, 2011 12:58 PM >> To: Bansal, Vikas >> Cc: Smart Guy; Ista Zahn; r-help@r-project.org >> Subject: Re: [R] For is.numeric condition in user input >> >&

Re: [R] For is.numeric condition in user input

2011-07-25 Thread jim holtman
t; >> >> Thanking you, >> Warm Regards >> Vikas Bansal >> Msc Bioinformatics >> Kings College London >> >> From: jim holtman [jholt...@gmail.com] >> Sent: Monday, July 25, 2011 12:58 PM >> To: Bansal, Vikas >> Cc: Smart Guy; Ista Z

Re: [R] For is.numeric condition in user input

2011-07-25 Thread Bansal, Vikas
day, July 25, 2011 12:58 PM > To: Bansal, Vikas > Cc: Smart Guy; Ista Zahn; r-help@r-project.org > Subject: Re: [R] For is.numeric condition in user input > > If you run a simple test (that is what is nice about R being > interpreted), you will see that 'as.numeric' is TRUE; w

Re: [R] For is.numeric condition in user input

2011-07-25 Thread jim holtman
t; Sent: Monday, July 25, 2011 12:58 PM > To: Bansal, Vikas > Cc: Smart Guy; Ista Zahn; r-help@r-project.org > Subject: Re: [R] For is.numeric condition in user input > > If you run a simple test (that is what is nice about R being > interpreted), you will see that 'as.n

Re: [R] For is.numeric condition in user input

2011-07-25 Thread Bansal, Vikas
From: jim holtman [jholt...@gmail.com] Sent: Monday, July 25, 2011 12:58 PM To: Bansal, Vikas Cc: Smart Guy; Ista Zahn; r-help@r-project.org Subject: Re: [R] For is.numeric condition in user input If you run a simple test (that is what is nice about R being interpreted), you will see that 'as.nu

Re: [R] For is.numeric condition in user input

2011-07-25 Thread jim holtman
=as.numeric(value) > and without this also.But did not find any solution. > > > Thanking you, > Warm Regards > Vikas Bansal > Msc Bioinformatics > Kings College London > ________________ > From: Smart Guy [smartgu...@gmail.com] > Sent: Monday,

Re: [R] For is.numeric condition in user input

2011-07-25 Thread Bansal, Vikas
martgu...@gmail.com] Sent: Monday, July 25, 2011 6:39 AM To: Ista Zahn Cc: Bansal, Vikas; r-help@r-project.org Subject: Re: [R] For is.numeric condition in user input Yes, thats right, readline will give you character and now you need to convert it to numeric to make it work. Thanks SmartG On 25 J

Re: [R] For is.numeric condition in user input

2011-07-24 Thread Smart Guy
Yes, thats right, readline will give you character and now you need to convert it to numeric to make it work. Thanks SmartG On 25 July 2011 08:51, Ista Zahn wrote: > readline always returns a character. See ?readline for details. > > Best, > Ista > > On Sun, Jul 24, 2011 at 10:59 PM, Bansal, Vi

Re: [R] For is.numeric condition in user input

2011-07-24 Thread Ista Zahn
readline always returns a character. See ?readline for details. Best, Ista On Sun, Jul 24, 2011 at 10:59 PM, Bansal, Vikas wrote: > Dear all, > > I am using the following function so that user can input a numerical value. > > readnumber<- function() >  { > for(j in 1:10){ >  value=readline("ente

[R] For is.numeric condition in user input

2011-07-24 Thread Bansal, Vikas
Dear all, I am using the following function so that user can input a numerical value. readnumber<- function() { for(j in 1:10){ value=readline("enter the threshold for number of reads: ") if(is.numeric(value)==T) {return(value) break} else print("wrong number Please enter numerical value ")}