Hello, First of all, 'c' is a bad name for a variable, it's also the name of an R function. Think a, b, k, d, ... Now, try y <- m %o% x + k Hope this helps, Rui Barradas Em 24-05-2012, 2:07, Abhay Joshi <http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=368600> escreveu: > > Hi All, > > I am very new to R, > > > > in Y=mX+c > > I have 10 values for X (X=1,2,3,4,5,6,7,8,9,10) > m is a distribution with mean 10 and sd 2 (m <- rnorm(n=100, m=10, sd=2)) > and > c is a distibution with mean 200 and sd 20 (c <- rnorm(n=100, m=200, sd=20)) > > How can I randomaly choose one number from m and c both 1000 times and find the 1000 values for Y for my 10 > values of X. > > Thanks for help. > > Abhay <http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=368600> > [[alternative HTML version deleted]]