I'm having trouble figuring out what the best practice is for this case. I came up with this based on another forum post:
UIRect uiRect = sprite.GetComponent<UIRect>();
uiRect.topAnchor.target = parent;
uiRect.bottomAnchor.target = parent;
uiRect.rightAnchor.target = parent;
uiRect.leftAnchor.target = parent;
uiRect.leftAnchor.absolute = 10;
uiRect.rightAnchor.absolute = 210;
uiRect.topAnchor.absolute = -10;
uiRect.bottomAnchor.absolute = 35;
But that anchors left to left side, right to right side, etc. My I want my sprite to be 200 wide, starting 10 from the left edge. This is easy as pie in the UI - I just set the sprite anchor's "left" to "target left" with a value of 10, and "right" to "target left" with a value of 210.
I thought maybe SetToNearest was a possible option, but the description and variable names make that function completely inscrutable to me. I'm sure things will be easier once I can figure out the abstraction from the data storage to the ui, but as it stands I have no clue what variables the Anchor panel represents.