<div dir="ltr">In reading the names of a data frame in an Rcpp program I find that the following both work:<div><br></div><div>CharacterVector nmz = dfr.names();<br></div><div>CharacterVector nmz = dfr.attr("names");<br></div><div><br></div><div>Is there any reason to prefer one to the other, or are they considered equivalent?</div></div>