In The Hairy Ape by Eugene O’Neill, Robert Smith is normally referred to as "Yank" despite its not being his real name. It is what is known as a "nickname", a name given to someone informally within a small group, sometimes as a form of affection. The use of nicknames often increases group cohesion and solidarity, functioning in anthropological terms as a new identity refecting initiation into group membership. The name "Paddy," also a nickname, reflects Irish ancestry, and "Yank" is a common British term for Americans, and thus "Yank" defines its possessor as prototypically American.
His initial "can do" attitude and dialect are meant to evoke almost a cliche of the American (the Yank or Yankee) as seen by other nations, as scene in this speech:
Yank: "What's dem slobs in de foist cabin got to do wit us? We're better men dan dey are, ain't we? Sure! One of us guys could clean up de whole mob wit one mit. Put one of 'em down here for one watch in de stokehole, what'd happen? Dey'd carry him off on a stretcher. Dem boids don't amount to nothin'. Dey're just baggage."