Standard milage vs actual expense

Can I switch to actual expense after using standard milage before? Does this get flagged by the IRS?