title: How can I run multiple lines of code in R
body: <p>I have just switched from windows 7 to windows 10 on my pc.</p>
  
  <p>When I was still using windows 7, using the combination CTRL+R or CTRL+ENTER would run the line of code that I was in. Moreover, if the code continued on one or more lines below or started above my current line, it would run the entire section without me having to select it. </p>
  
  <p>After switching to windows 10, the same combinations will only run the line of code that I am currently in, or the piece of code that is selected by me. To give an example:</p>
  
  <pre><code> #Tryout
   for(i in 1:3){
    print(i)
   }
  </code></pre>
  
  <p>This code would normally run at once without having to select it, even when I would start in the first line (#Tryout). Now, if I don't select, I will need to use CTRL+R or CTRL+ENTER three times to go through this code and I have to start in the correct line. Starting in the line #Tryout will not run any part of the code but will only result in the line #Tryout being shown in the console.</p>
  
  <p>I'm not good with computers (in your answers please pretend to be adressing a five-year-old) so I had one of my colleagues look at it who's our expert on R. Here are the findings:</p>
  
  <ul>
  <li>The problem occurs in both RStudio as the standalone version of R.</li>
  <li>I'm using R version 3.3.2, the same as before the windows update. Switching to version 3.5 didn't solve the problem.</li>
  <li>I have other colleagues also using R 3.3 in combination with windows 10 for whom this problem does not occur.</li>
  <li>Going to Tools-Global Options-Code and checking the box of 'Focus console after executing from source' doesn't help</li>
  <li>When we went to 'Modify Keyboard Shortcuts', the name attached to the shortcut (CTRL+R or CTRL+ENTER) was the same as it was for other colleagues for which the function does run all lines in a command: 'Run Current Line or Selection'</li>
  </ul>
  
  <p>The problem is not preventing me from using R, but it is tedious and I hope someone can help me to solve it.
  Thanks so much for reading!</p>