Re: [R] User input from keyboard

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Fri 04 Aug 2006 - 22:19:46 EST


Hi

cat("\n","Enter x","\n") # prompt
y<-scan(n=1)

prompts for user imput and scans 1 line from console.

HTH
Petr

On 4 Aug 2006 at 17:06, chiya sharma wrote:

Date sent:      	Fri, 4 Aug 2006 17:06:38 +0530
From:           	"chiya sharma" <chiya31@gmail.com>
To:             	r-help@stat.math.ethz.ch
Subject:        	[R] User input from keyboard

> Dear All,
>
> Can anybody tell me the syntax for "User input from keyboard" in R. I
> mean
> to say that if I run the program it should ask "Please enter the date"
> at the begining of the program. I am using R-2.2.1 for windows.
>
> Any help will be greatly appreciated.
> thanks in advance.
>
> Regards,
> Chiya
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.

Petr Pikal
petr.pikal@precheza.cz



R-help@stat.math.ethz.ch 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. Received on Fri Aug 04 23:28:57 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 05 Aug 2006 - 02:18:13 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.