How are research and development cost accounted for in the United States?

Thanks for your help.