Having difficulty in running a code chunk in R Markdown

Hard to say without a reprex (see the FAQ). The first error shows that there is some disconnect between select() and the object that is being piped to it. But that's just a guess. Because screenshots.