regenerate R file