Re: [R] Re adline()

2009-11-25 Thread yonosoyelmejor

Is that what I did is to link it directly, then I click on it and I was
launching the console run,but try it another way, what I did was use vectors
and so I saved it.So we can conclude the issue,thank you very much indeed
for your help

Cheers
Ignacio.

JorisMeys wrote:
> 
> I run your script from the windows console (evidently), and as said, I
> can't reproduce your error. Can you give me the exact command you use
> to run it from the windows console?
> 
> Cheers
> Joris
> 
> On Tue, Nov 24, 2009 at 7:33 PM, yonosoyelmejor
>  wrote:
>>
>> Sure,but my problem is that the script is run from the console
>> windows,therefore I believe that the cat or readline doesn´t work...
>>
>> JorisMeys wrote:
>>>
>>> I can't reproduce the error you have. With me, it runs all fine. In
>>> fact, readline apparently flushes automatically, as I didn't have to
>>> use the flush.console() at all.
>>>
>>> test.r
>>> ---
>>> cat("1- 24horas\n")
>>>  cat("2- 12horas\n")
>>>  cat("3- 8horas\n")
>>>  selection<-readline(prompt="\nSelecciona numero de horas:")
>>>
>>>  if(selection=="1"){
>>>  cat("Selection1\n")
>>>  }
>>>  if(selection=="2"){
>>>  cat("Selection2\n")
>>>  }
>>>  if(selection=="3"){
>>>  cat("Selection3\n")
>>>  }
>>>
>>> source("G:/Temp/test.r") # load the saved script "test.r"
>>>
>>>
>>> You can try to look at ?announce (package odfWeave) instead of cat and
>>> flush.console, but I have the slight impression there is something
>>> else going wrong.
>>>
>>> Cheers
>>> Joris
>>>
>>>
>>> On Tue, Nov 24, 2009 at 11:10 AM, yonosoyelmejor
>>>  wrote:

 I put that before selection but Nothing happened...I don´t know because
 when
 I executed the code, in the console doesn´t show cat("1-24hours)...and
 neither asked me Select numers of hours from de line or readline...

 Peter Dalgaard wrote:
>
> yonosoyelmejor wrote:
>> Hello, I would like to ask you a question.I have a program in R and I
>> use
>> the
>> readline method to ask the user some things,but i don´t use the R
>> console
>> but I use Win console then not appear what I put.I put the code as
>> you
>> look
>> for:
>>
>> cat("1- 24horas\n")
>> cat("2- 12horas\n")
>> cat("3- 8horas\n")
>> selection<-readline(prompt="\nSelecciona numero de horas:")
>>
>> if(selection=="1"){
>> prediccion=exp(x.reconstruida[1441:1450])
>> }
>> if(selection=="2"){
>> prediccion=exp(x.reconstruida[720:729])
>> }
>> if(selection=="3"){
>> prediccion=exp(x.reconstruida[481:491])
>> }
>>
>> write.table(prediccion,"C:\\Temp\\prePrueba.txt",quote=F,row.names=F,append=T,col.names=F)
>>
>>
>> //end of code.
>>
>> Excuse me but my English is bad, i hope explained me well,
>>
>> A greeting,
>> Ignacio.
>>
>>
>
> I think this is a matter of flushing the console before the readline
> call. See ?flush.console
>
> -pd
>
> --
>    O__   Peter Dalgaard             Øster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45)
> 35327918
> ~~ - (p.dalga...@biostat.ku.dk)              FAX: (+45)
> 35327907
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

 --
 View this message in context:
 http://old.nabble.com/Readline%28%29-tp26476979p26493350.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

>>>
>>> __
>>> R-help@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Readline%28%29-tp26476979p26499915.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> __
> R-help@r-project.org mailing list
> https://stat.eth

Re: [R] Re adline()

2009-11-25 Thread joris meys
I run your script from the windows console (evidently), and as said, I
can't reproduce your error. Can you give me the exact command you use
to run it from the windows console?

Cheers
Joris

On Tue, Nov 24, 2009 at 7:33 PM, yonosoyelmejor
 wrote:
>
> Sure,but my problem is that the script is run from the console
> windows,therefore I believe that the cat or readline doesn´t work...
>
> JorisMeys wrote:
>>
>> I can't reproduce the error you have. With me, it runs all fine. In
>> fact, readline apparently flushes automatically, as I didn't have to
>> use the flush.console() at all.
>>
>> test.r
>> ---
>> cat("1- 24horas\n")
>>  cat("2- 12horas\n")
>>  cat("3- 8horas\n")
>>  selection<-readline(prompt="\nSelecciona numero de horas:")
>>
>>  if(selection=="1"){
>>  cat("Selection1\n")
>>  }
>>  if(selection=="2"){
>>  cat("Selection2\n")
>>  }
>>  if(selection=="3"){
>>  cat("Selection3\n")
>>  }
>>
>> source("G:/Temp/test.r") # load the saved script "test.r"
>>
>>
>> You can try to look at ?announce (package odfWeave) instead of cat and
>> flush.console, but I have the slight impression there is something
>> else going wrong.
>>
>> Cheers
>> Joris
>>
>>
>> On Tue, Nov 24, 2009 at 11:10 AM, yonosoyelmejor
>>  wrote:
>>>
>>> I put that before selection but Nothing happened...I don´t know because
>>> when
>>> I executed the code, in the console doesn´t show cat("1-24hours)...and
>>> neither asked me Select numers of hours from de line or readline...
>>>
>>> Peter Dalgaard wrote:

 yonosoyelmejor wrote:
> Hello, I would like to ask you a question.I have a program in R and I
> use
> the
> readline method to ask the user some things,but i don´t use the R
> console
> but I use Win console then not appear what I put.I put the code as you
> look
> for:
>
> cat("1- 24horas\n")
> cat("2- 12horas\n")
> cat("3- 8horas\n")
> selection<-readline(prompt="\nSelecciona numero de horas:")
>
> if(selection=="1"){
> prediccion=exp(x.reconstruida[1441:1450])
> }
> if(selection=="2"){
> prediccion=exp(x.reconstruida[720:729])
> }
> if(selection=="3"){
> prediccion=exp(x.reconstruida[481:491])
> }
>
> write.table(prediccion,"C:\\Temp\\prePrueba.txt",quote=F,row.names=F,append=T,col.names=F)
>
>
> //end of code.
>
> Excuse me but my English is bad, i hope explained me well,
>
> A greeting,
> Ignacio.
>
>

 I think this is a matter of flushing the console before the readline
 call. See ?flush.console

 -pd

 --
    O__   Peter Dalgaard             Øster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
 ~~ - (p.dalga...@biostat.ku.dk)              FAX: (+45) 35327907

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Readline%28%29-tp26476979p26493350.html
>>> Sent from the R help mailing list archive at Nabble.com.
>>>
>>> __
>>> R-help@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Readline%28%29-tp26476979p26499915.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Re adline()

2009-11-24 Thread yonosoyelmejor

Sure,but my problem is that the script is run from the console
windows,therefore I believe that the cat or readline doesn´t work...

JorisMeys wrote:
> 
> I can't reproduce the error you have. With me, it runs all fine. In
> fact, readline apparently flushes automatically, as I didn't have to
> use the flush.console() at all.
> 
> test.r
> ---
> cat("1- 24horas\n")
>  cat("2- 12horas\n")
>  cat("3- 8horas\n")
>  selection<-readline(prompt="\nSelecciona numero de horas:")
> 
>  if(selection=="1"){
>  cat("Selection1\n")
>  }
>  if(selection=="2"){
>  cat("Selection2\n")
>  }
>  if(selection=="3"){
>  cat("Selection3\n")
>  }
> 
> source("G:/Temp/test.r") # load the saved script "test.r"
> 
> 
> You can try to look at ?announce (package odfWeave) instead of cat and
> flush.console, but I have the slight impression there is something
> else going wrong.
> 
> Cheers
> Joris
> 
> 
> On Tue, Nov 24, 2009 at 11:10 AM, yonosoyelmejor
>  wrote:
>>
>> I put that before selection but Nothing happened...I don´t know because
>> when
>> I executed the code, in the console doesn´t show cat("1-24hours)...and
>> neither asked me Select numers of hours from de line or readline...
>>
>> Peter Dalgaard wrote:
>>>
>>> yonosoyelmejor wrote:
 Hello, I would like to ask you a question.I have a program in R and I
 use
 the
 readline method to ask the user some things,but i don´t use the R
 console
 but I use Win console then not appear what I put.I put the code as you
 look
 for:

 cat("1- 24horas\n")
 cat("2- 12horas\n")
 cat("3- 8horas\n")
 selection<-readline(prompt="\nSelecciona numero de horas:")

 if(selection=="1"){
 prediccion=exp(x.reconstruida[1441:1450])
 }
 if(selection=="2"){
 prediccion=exp(x.reconstruida[720:729])
 }
 if(selection=="3"){
 prediccion=exp(x.reconstruida[481:491])
 }

 write.table(prediccion,"C:\\Temp\\prePrueba.txt",quote=F,row.names=F,append=T,col.names=F)


 //end of code.

 Excuse me but my English is bad, i hope explained me well,

 A greeting,
 Ignacio.


>>>
>>> I think this is a matter of flushing the console before the readline
>>> call. See ?flush.console
>>>
>>> -pd
>>>
>>> --
>>>    O__   Peter Dalgaard             Øster Farimagsgade 5, Entr.B
>>>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>>>  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
>>> ~~ - (p.dalga...@biostat.ku.dk)              FAX: (+45) 35327907
>>>
>>> __
>>> R-help@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Readline%28%29-tp26476979p26493350.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Readline%28%29-tp26476979p26499915.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Re adline()

2009-11-24 Thread joris meys
I can't reproduce the error you have. With me, it runs all fine. In
fact, readline apparently flushes automatically, as I didn't have to
use the flush.console() at all.

test.r
---
cat("1- 24horas\n")
 cat("2- 12horas\n")
 cat("3- 8horas\n")
 selection<-readline(prompt="\nSelecciona numero de horas:")

 if(selection=="1"){
 cat("Selection1\n")
 }
 if(selection=="2"){
 cat("Selection2\n")
 }
 if(selection=="3"){
 cat("Selection3\n")
 }

source("G:/Temp/test.r") # load the saved script "test.r"


You can try to look at ?announce (package odfWeave) instead of cat and
flush.console, but I have the slight impression there is something
else going wrong.

Cheers
Joris


On Tue, Nov 24, 2009 at 11:10 AM, yonosoyelmejor
 wrote:
>
> I put that before selection but Nothing happened...I don´t know because when
> I executed the code, in the console doesn´t show cat("1-24hours)...and
> neither asked me Select numers of hours from de line or readline...
>
> Peter Dalgaard wrote:
>>
>> yonosoyelmejor wrote:
>>> Hello, I would like to ask you a question.I have a program in R and I use
>>> the
>>> readline method to ask the user some things,but i don´t use the R console
>>> but I use Win console then not appear what I put.I put the code as you
>>> look
>>> for:
>>>
>>> cat("1- 24horas\n")
>>> cat("2- 12horas\n")
>>> cat("3- 8horas\n")
>>> selection<-readline(prompt="\nSelecciona numero de horas:")
>>>
>>> if(selection=="1"){
>>> prediccion=exp(x.reconstruida[1441:1450])
>>> }
>>> if(selection=="2"){
>>> prediccion=exp(x.reconstruida[720:729])
>>> }
>>> if(selection=="3"){
>>> prediccion=exp(x.reconstruida[481:491])
>>> }
>>>
>>> write.table(prediccion,"C:\\Temp\\prePrueba.txt",quote=F,row.names=F,append=T,col.names=F)
>>>
>>>
>>> //end of code.
>>>
>>> Excuse me but my English is bad, i hope explained me well,
>>>
>>> A greeting,
>>> Ignacio.
>>>
>>>
>>
>> I think this is a matter of flushing the console before the readline
>> call. See ?flush.console
>>
>> -pd
>>
>> --
>>    O__   Peter Dalgaard             Øster Farimagsgade 5, Entr.B
>>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>>  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
>> ~~ - (p.dalga...@biostat.ku.dk)              FAX: (+45) 35327907
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Readline%28%29-tp26476979p26493350.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Re adline()

2009-11-24 Thread yonosoyelmejor

I put that before selection but Nothing happened...I don´t know because when
I executed the code, in the console doesn´t show cat("1-24hours)...and
neither asked me Select numers of hours from de line or readline...

Peter Dalgaard wrote:
> 
> yonosoyelmejor wrote:
>> Hello, I would like to ask you a question.I have a program in R and I use
>> the
>> readline method to ask the user some things,but i don´t use the R console
>> but I use Win console then not appear what I put.I put the code as you
>> look
>> for:
>> 
>> cat("1- 24horas\n")
>> cat("2- 12horas\n")
>> cat("3- 8horas\n")
>> selection<-readline(prompt="\nSelecciona numero de horas:")
>> 
>> if(selection=="1"){
>> prediccion=exp(x.reconstruida[1441:1450])
>> }
>> if(selection=="2"){
>> prediccion=exp(x.reconstruida[720:729])
>> }
>> if(selection=="3"){
>> prediccion=exp(x.reconstruida[481:491])
>> }
>> 
>> write.table(prediccion,"C:\\Temp\\prePrueba.txt",quote=F,row.names=F,append=T,col.names=F)
>> 
>> 
>> //end of code.
>> 
>> Excuse me but my English is bad, i hope explained me well,
>> 
>> A greeting,
>> Ignacio.
>> 
>> 
> 
> I think this is a matter of flushing the console before the readline
> call. See ?flush.console
> 
> -pd
> 
> -- 
>O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
>  (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
> ~~ - (p.dalga...@biostat.ku.dk)  FAX: (+45) 35327907
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Readline%28%29-tp26476979p26493350.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Re adline()

2009-11-23 Thread Peter Dalgaard
yonosoyelmejor wrote:
> Hello, I would like to ask you a question.I have a program in R and I use the
> readline method to ask the user some things,but i don´t use the R console
> but I use Win console then not appear what I put.I put the code as you look
> for:
> 
> cat("1- 24horas\n")
> cat("2- 12horas\n")
> cat("3- 8horas\n")
> selection<-readline(prompt="\nSelecciona numero de horas:")
> 
> if(selection=="1"){
> prediccion=exp(x.reconstruida[1441:1450])
> }
> if(selection=="2"){
> prediccion=exp(x.reconstruida[720:729])
> }
> if(selection=="3"){
> prediccion=exp(x.reconstruida[481:491])
> }
> 
> write.table(prediccion,"C:\\Temp\\prePrueba.txt",quote=F,row.names=F,append=T,col.names=F)
> 
> 
> //end of code.
> 
> Excuse me but my English is bad, i hope explained me well,
> 
> A greeting,
> Ignacio.
> 
> 

I think this is a matter of flushing the console before the readline
call. See ?flush.console

-pd

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - (p.dalga...@biostat.ku.dk)  FAX: (+45) 35327907

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re adline()

2009-11-23 Thread yonosoyelmejor

Hello, I would like to ask you a question.I have a program in R and I use the
readline method to ask the user some things,but i don´t use the R console
but I use Win console then not appear what I put.I put the code as you look
for:

cat("1- 24horas\n")
cat("2- 12horas\n")
cat("3- 8horas\n")
selection<-readline(prompt="\nSelecciona numero de horas:")

if(selection=="1"){
prediccion=exp(x.reconstruida[1441:1450])
}
if(selection=="2"){
prediccion=exp(x.reconstruida[720:729])
}
if(selection=="3"){
prediccion=exp(x.reconstruida[481:491])
}

write.table(prediccion,"C:\\Temp\\prePrueba.txt",quote=F,row.names=F,append=T,col.names=F)


//end of code.

Excuse me but my English is bad, i hope explained me well,

A greeting,
Ignacio.


-- 
View this message in context: 
http://old.nabble.com/Readline%28%29-tp26476979p26476979.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] re adline detection problems

2008-01-14 Thread deegs_ca

I ran into identical readline problems.  For me appealing to the sysadmin to
install readline correctly with rpms or the like was not an option.  I
needed a personal copy of R which I could update and add packages to at my
own discretion. So I

1. got readline 5.2 from gnu.org.   
2. From readline extracted distribution root folder, called ./configure
--prefix=/myreadlinehome; make; make install
3. From R extracted distribution root folder, executed the following
configure command
./configure LDFLAGS="-L/myreadlinehome/lib"  --prefix=/myrhome
CPPFLAGS="-I/myreadlinehome/include/"

Performing those steps allowed me to build a version of R with all the
familiar up/down arrow tab completion etc.
-- 
View this message in context: 
http://www.nabble.com/readline-detection-problems-tp2719581p14816968.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.