Re adline()
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.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
______________________________________________ R-help at 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.