R: use stage api