title: Error in `[.default`(xj, i) : only 0's may be mixed with negative subscripts
body: <p>I am trying to write a code to get some files for me and clean them. Some files don't quite fit my cleaning function, so I designed some code to clean them up and make them a standard format.</p>
  
  <pre><code>if (length(paste0("Rsa1976",files_suffixes[x])&gt;1658)){
    n=length(paste0("Rsa1976",files_suffixes[x]))-1658
    paste0("Rsa1976",files_suffixes[x])=get(paste0("Rsa1976",files_suffixes[x]))[-c(1659:n),]
  }
  </code></pre>
  
  <p>I just started getting this error:</p>
  
  <blockquote>
    <p>Error in <code>[.default</code>(xj, i) :    only 0's may be mixed with negative subscripts  </p>
  </blockquote>
  
  <p>when I tried to run the program. Does anyone know what this means?</p>
  
  <p>EDIT:
  In this case: files_suffixes is a list containing the suffixes of several dataframes, and "Rsa1976" is the common prefix between all these dataframes. As a result, paste0("Rsa1976",files_suffixes[x]) is referring to the dataframe whose suffix is the xth term of files_suffixes. What I am trying to do is, if the matrix has more than 1658 rows, remove those rows.</p>