Set your working directory before calling the function. Also, the function depends on the rgdal and httr packages, and requires that you have Rtools installed (and that you have Rtools in your PATH if you are on Windows) if you want to upload spatial data frames.
1 | r2cartodb(obj, layer_name, account_id, api_key)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.