>> 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
>>
>&
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
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
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
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
=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,
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
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
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
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 ")}
10 matches
Mail list logo