title: Simulating a dataset in R
body: <p>I'm still fairly new to R and get stuck a bit. I am trying to simulate a dataset in R with certain parameters. For example, if I want my number of observations to be 100, and have x be a random normal variable where the mean is 0 and the standard deviation is 1, fulfilling the following equation y=0.7+3*x+\mu. Further, \mu is a random normal error with mean 1 and sd of 2. </p>
  
  <p>Now, I have the basics of the code for the initial values, but don't know how to add in the equation or the 100 individual random normal errors.</p>
  
  <pre><code> set.seed(1)
   x &lt;- rnorm(n=100, mean=0, sd=1)
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>Thanks!</p>