Hi Joel,
It seems you are running v2 R code. This v3 tutorial Bulk Data Downloading in R (API v3) - Help / R - Dewey Community (deweydata.io) has new R code for API v3. Usages are almost same as v2 R code but inside is different. Please copy R code from the above API v3 tutorial and run again.
Thanks,