title: How to make an R object immutable?
body: <p>I am trying to create an immutable data-frame in R.
  Something like</p>
  
  <pre><code>df = iris
  df = make_immutable(df)
  
  df = df[1:100,] #gives error because df is now immutable
  </code></pre>
  
  <p>Is there any such function in R, like <code>make_immutable</code>, which can restrict an R object from further modifications during the session?</p>
  
  <p><code>Context:</code>
  I have a machine learning pipeline which has a component written by a fellow developer who is modifying a data-frame in-place at multiple places. I want to restrict the modification of this data frame after some point. Any help is highly appreciated.</p>