title: I am using mapvalues() but it is showing error
body: <pre><code>datac$rank &lt;- mapvalues(data$rank, from = c(1,2,3,4),
                        to= c(4,3,2,1), warn_missing = TRUE)
  </code></pre>
  
  <blockquote>
    <p>Error in data$rank : object of type 'closure' is not subsettable</p>
  </blockquote>