0

I have a data frame produced from dput. Ideally, when running this dput, the test data frame should have 12 rows with row number 1:12. However, when running this, row 9 to 12 will be produced as row 5.1, 6.1, 7.1 and 8.1. I am sure that the contents of each row are different. I have sf geometry object for each row in this data frame. I am wondering what is the potential reason for causing this issue?

Thanks in advance!

example code (it's very long and exceed the limit of StackOverflow, I will put it into Google drive link):

https://drive.google.com/file/d/12XduN3iukE2VHu8yuf2ZfIwrlnu9wLjD/view?usp=sharing

screenshot of the problem rows:enter image description here

Jingjun
  • 177
  • 7
  • Hi @Jingjun, very few people will download your code from an external link. You'll get more responses if you can reduce your code to a minimal, reproducible example and paste it directly here in your question. – SymbolixAU Feb 12 '22 at 01:22

1 Answers1

0

Isn't it because row names are explicitly named in your data frame?

      .Names = character(0)
    ),
    row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "5.1", "6.1", "7.1", "8.1"),
    class = c("sf", "data.frame")
  ),
Grzegorz Sapijaszko
  • 1,913
  • 1
  • 5
  • 12