Hi,
how can I produce random data which lies around a straight line with angle
45 degree.
Similar to this image: http://zoonek2.free.fr/UNIX/48_R/g134.png
Cheers
--
View this message in context:
http://old.nabble.com/Random-data-tp26513822p26513822.html
Sent from the R help mailing list
one way is:
x - sort(rnorm(100))
y - rnorm(100, mean = x, sd = 0.3)
plot(x, y)
abline(a = 0, b = 1)
I hope it helps.
Best,
Dimitris
mentor_ wrote:
Hi,
how can I produce random data which lies around a straight line with angle
45 degree.
Similar to this image:
-help-boun...@r-project.org]
On Behalf Of mentor_
Sent: Wednesday, November 25, 2009 8:43 AM
To: r-help@r-project.org
Subject: [R] Random data
Hi,
how can I produce random data which lies around a straight line with angle
45 degree.
Similar to this image: http://zoonek2.free.fr/UNIX/48_R
That's not a 45-degree angle: the x and y scales are quite different. But
you can use corgen from the ecodist package to create correlated x and
y variables, and then adjust the scale as needed.
Sarah
On Wed, Nov 25, 2009 at 9:42 AM, mentor_ ment...@gmx.net wrote:
Hi,
how can I produce
4 matches
Mail list logo