In a Drupal .htaccess file, these rules must come before RewriteBase.
So:
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^raw/(.*)$ http://data.agaric.com/$1 [R=301,L]
# All the usual rules
</IfModule>
That rule removes the 'raw/' from all incoming URLs and permanently redirects (301) to the non-raw version.