title: How to move a column down one without deleting a row in R
body: <p>I have data in 1 column which is off by 1 (the data needs to shift down by 1), all other columns are correct though. Currently I am moving the column down one using:</p>
  
  <p><code>df &lt;- na.omit(transform(df,  region = c(NA, region[-nrow(df)])))</code></p>
  
  <p>However this seems to be removing the entire top row from my dataset (when I search for the gene in the first row after this line of code I cannot find it in the data) - is this what is happening in this line of code and is there a way to specify to not remove the top row when shifting down but place NA or 0 instead in the columns new top cell for that first row of data?</p>
  
  <p>For example my data looks like this (the region column data is wrong and needs to shift down by 1):</p>
  
  <pre><code>Gene     Distance   Region
  ACE          1       region1
  BRCA         2       region2
  NOTCH3       3       region2
  EGFR         4       region2
  P53          5       region3
  </code></pre>
  
  <p>I want my data output to be this:</p>
  
  <pre><code>Gene     Distance   Region
  ACE          1       region1
  BRCA         2       region1
  NOTCH3       3       region2
  EGFR         4       region2
  P53          5       region2
  </code></pre>
  
  <p>My output with the code above currently looks like this:</p>
  
  <pre><code>Gene     Distance   Region
  BRCA         2       region1
  NOTCH3       3       region2
  EGFR         4       region2
  P53          5       region2
  </code></pre>
  
  <p>It wouldn't matter to me if the ACE region was just NA or 0, if possible, but I am not sure how to specify that.</p>