added R publish to teachpress function