I assume you're talking about from nexus into R. If not, I'm not sure this is the right place to ask.
I'm really not that familiar with nexus. It's possible that the functionality exists in the phylobase package:
I think readNexus() would be the relevant function, there.
You might peruse some other relevant packages and functions here:
https://www.rdocumentation.org/search?q=nexus&latest=