Electronic properties and spintronic applications of r-N-graphyne nanoribbons