From: Gundala Viswanath <gundalav_at_gmail.com>

Date: Mon, 23 Jun 2008 17:47:04 +0900

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. Received on Mon 23 Jun 2008 - 08:50:30 GMT

Date: Mon, 23 Jun 2008 17:47:04 +0900

Hi,

> x <- c(30.9, 60.1 , 70.0 , 73.0 , 75.0 , 83.9 , 93.1 , 97.6 , 98.8 , 113.9)

[1] 30.9 60.1 70.0 73.0 75.0 83.9 93.1 97.6 98.8 113.9

> mean.x <- mean(x)

[1] 79.63

I wish to:

- Create a new vector (nx) with the same size as "x"
- Fill "nx" with the mean value

thus in the end I hope to get something like:

[1] 79.63 79.63 79.63 79.63 79.63 79.63 79.63 79.63 79.63 79.63

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. Received on Mon 23 Jun 2008 - 08:50:30 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Mon 23 Jun 2008 - 10:30:46 GMT.

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