title: Creating a new column in data i have imported from a csv file
body: <p>i have a task that i need to complete in R studio using R language. i'm new to this.
  i have a &quot;CSV&quot; file with a table that consists of 80 columns and 568 rows after i sampled 80% of the original data file. now i need to add a column to the table and calculate the (max - min) of each row and that column will show the results of each row in this new data file.</p>
  <pre><code>data &lt;- read.csv(file.choose(), header=T)
  data
  
  data$maxSubMin &lt;- for(i in 1:568){
    max(data[i,1:78]) - min(data[i,1:78])
  }
  </code></pre>
  <p>there are no errors shown in the log, but there is no new column...
  somebody knows whats the reason?</p>