title: attempt to set an attribute on NULL
body: <pre><code>Error in data.table::rbindlist(.data, ...) : 
    attempt to set an attribute on NULL
  </code></pre>
  
  <p>I am getting this error at:</p>
  
  <pre><code>FBInsightsExpanded &lt;- list.stack(list.select(FBInsightsExpanded, website_purchase_roas = website_purchase_roas$action_link_click_destination));
    print(FBInsightsExpanded)
  </code></pre>
  
  <p>This is what the DF looks like. I am guessing I need to replace NULLs with NA's. But not able to get a fix for it so far</p>
  
  <pre><code> website_purchase_roas  date_stop
  1    0.673001 offsite_conversion.fb_pixel_purchase, 6.506892 2018-10-11
  2    1.369035 offsite_conversion.fb_pixel_purchase, 0.594109 2018-10-11
  3    2.084238                                           NULL 2018-10-11
  4     1.31209                                           NULL 2018-10-11
  5    2.337662                                           NULL 2018-10-11
  6    0.996678                                           NULL 2018-10-11
  7    1.936385 offsite_conversion.fb_pixel_purchase, 1.482508 2018-10-11
  8    2.777778                                           NULL 2018-10-11
  9           0                                           NULL 2018-10-11
  10   1.994885                                           NULL 2018-10-11
  11   2.402023                                           NULL 2018-10-11
  12   4.635056 offsite_conversion.fb_pixel_purchase, 5.222421 2018-10-11
  13          0                                           NULL 2018-10-11
  14   1.990291                                           NULL 2018-10-11
  15   6.557377                                           NULL 2018-10-11
  16   3.703704                                           NULL 2018-10-11
  17   3.038936                                           NULL 2018-10-11
  </code></pre>
  
  <p>Here's what the code looks like:</p>
  
  <pre><code>library(httr)
  library(fbRads)
  library(rlist)
  library(rhdfs)
  library(Rfacebook)
  library(SocialMediaLab)
  library(dplyr)
  
  
  app &lt;- oauth_app('facebook', 'xxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxx')
  fbacc &lt;- fbad_init(accountid = id, token = "token", version = '3.0')
  
  
  FBInsightsExpanded &lt;- fb_insights(level = 'ad',
                                          time_range=sprintf("{'since':%s,'until':%s}", paste('"', maxDate, '"', sep=''), paste('"', yesterdayDate, '"', sep='')), time_increment= 1  ,                        
                                          fields = toJSON(c("impressions",
                                                    "date_start",
                                                    "reach",
                                                    "frequency", 
                                                    "ad_name",
                                                    "adset_name", 
                                                    "campaign_name", 
                                                    "clicks",
                                                    "cpc",
                                                    "cpm",
                                                    "cpp",
                                                    "ctr",
                                                    "objective",
                                                    "spend", 
                                                    "account_name",
                                                    "ad_id",
                                                    "adset_id",
                                                    "buying_type",
                                                    "campaign_id",
                                                    "canvas_avg_view_time",
                                                    "cost_per_unique_click",
                                                    "inline_link_click_ctr",
                                                    "social_spend",
                                                    "total_action_value",
                                                    "unique_clicks",
                                                    "unique_ctr",
                                                    "website_purchase_roas")));
  
  
    FBInsightsExpanded &lt;- list.stack(list.select(FBInsightsExpanded, website_purchase_roas = website_purchase_roas$value));
  </code></pre>
  
  <p>** Edit: packagelist and relevant bits of code as suggested</p>