You may use the class as a departmental account. Set up marketing, R&D, production, etc. as a class; then, tag it to each income or expense account when creating an invoice or bill.