[R] random number generation

Karim Mezhoud kmezhoud at gmail.com
Wed Nov 11 17:50:03 CET 2015


Hi,
This generate matrix:
matrix( rnorm(5*4,mean=0,sd=1), 5, 4)

for correlated matrix please see this link:
http://stackoverflow.com/questions/10680658/how-can-i-create-a-correlation-matrix-in-r
Karim


On Wed, Nov 11, 2015 at 9:38 AM, leila zamani via R-help <
r-help at r-project.org> wrote:

> Hi every one,
> I'm new to R. I read about R and search all the packages but I couldn't
> find the package that I want. I want to generate 2D (matrices) random
> numbers that have correlation between them. One of my friends said that R
> has a function in geor like rand...(spherical (correlation
> coefficient=0.5)), but I read all packages with geo,like
> geor,geoRlgm,georob and etc, but I didn't find this! Can you help me?
> Thanks.
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list