"I Am Legend" has been made into 3 or more movies, none of which have anything like the book's ending.
The Last Man on Earth (1964) is dull and misses the point almost entirely, but almost manages the title line. Not quite.
The Omega Man (1971) is exciting and misses the point even further.
I Am Legend (2007) almost gets it. The vampires are competent. Will Smith's smarter than Neville of the book, but crazier. But then both endings fail to treat the vampires as a society.
The original cut of the 2007 ended with Will Smith's character realizing he had been abducting and murdering conscious, aware creatures. The ending has the vampires doing a rescue mission, visibly terrified of Smith, and then he allows the one he abducted to rejoin her society.
Test audiences apparently didn't like it or didn't understand it
I read the book on a whim in high school. I think it was one of those random Barnes and Nobles finds. The ending was an amazing horror twist, with Neville realizing he's the monster and the audience realizing that they've been rooting for the villain The whole time, and the acceptance of the transition to the new society.
The only adaptation I've seen was the Will Smith movie which was generic zombie movie nonsense.
It's funny the irony of I Am Legend, it is an allegory to an older society having to make way to a newer one, and somehow every time that's the story they can't do.