title: Setting the width of formattable() object
body: <p>I am using the formattable package (AWESOME PACKAGE) to do some conditional formatting on a table of data that I have web scraped. I want to put the resulting object in a html document side by side with another <code>formattable()</code> table. I can't, however, figure out how to set the width of the table(either in the function or in the knitr chunk), and consequently how to put the two objects side by side. </p>
  
  <p>Here is my code. I realize it is sloppy. Can someone help me put two of the same table side by side in .rmd knitting to html? It will in reality be two different formattable() tables but it doesn't really matter for this purpose.</p>
  
  <pre><code>library(formattable, quietly = T)
  library(rvest, quietly = T)
  
  
  
  #Part 1: Air pollution forecast from sparetheair.org
  #read the page
  #0-50 Good Green
  #51-100 Moderate Yellow
  #101-150 Unhealthy for Sensitive Groups Orange
  #151-200 Unhealthy  Red
  #201-300 Very Unhealthy Purple --&gt; Also red for simplicity
  air_quality &lt;- read_html("http://sparetheair.org/stay-informed/todays-     air-quality/five-day-forecast")
  #Scrape table
  box &lt;- html_nodes(air_quality,"div div .f5day")
  content &lt;- html_text(box)
  #Text cleaning, removing artifacts
  fulltext &lt;- gsub("\n"," ",content)
  fulltext1 &lt;- gsub("\n"," ",fulltext)
  fulltext2 &lt;- gsub("\r"," ", fulltext1)
  fulltext3 &lt;- gsub("\t"," ", fulltext2)
  #split the string into a character vector of strings
  mytext &lt;- unlist(strsplit(fulltext3," "))
  #Leave empty spaces out, 
  wholething &lt;- mytext[mytext != ""]
  #vector of days
  Days &lt;- wholething[1:5]
  #character data for table construction
  wholedata &lt;- wholething[6:69]
  #a subset of Oakland related data
  baydata &lt;- wholedata[13:26]  
  #convert to data frame exactly as it is on website
  mydf &lt;- data.frame(rbind(baydata[5:9], baydata[10:14]),    row.names=c("AQI","PMI"))
  #transposed data frame (tidy data, observations in rows, variables in cols)
  tmydf &lt;- data.frame(cbind(Days, baydata[5:9], baydata[10:14]), row.names = NULL, stringsAsFactors = F)
  #replace the names of the new df with the webscraped days of the week
  names(tmydf) &lt;- c("Day","AQI","PMI")
  tmydf$PMI &lt;- gsub("PM","",tmydf$PMI)
  #Print to an html table the resulting dataframe
  #eventually this will have some color coding or reactive element
  #focus only on numeric variables
  smaller &lt;- tmydf[1:2,]
  #Coerce to numeric
  smaller$AQI &lt;- as.numeric(smaller$AQI)
  smaller$PMI &lt;- as.numeric(smaller$PMI)
  #Format ouput based on scale above
  nicetable &lt;- formattable(smaller, 
                           list( 
                               AQI = formatter("span", style = x ~ 
                                                   ifelse(x &lt;= 50, style(display = "block",`border-radius` = "4px",
                                                                         padding = "0 4px",background = "green", 
                                                                         color = "white", font.weight = "bold"), 
                                                          ifelse(x &lt;= 100, style(display = "block",`border-radius` = "4px",
                                                                                 padding = "0 4px", background = "yellow", 
                                                                                 color ="white", font.weight = "bold"), 
                                                                 style(display = "block",`border-radius` = "4px",
                                                                       padding = "0 4px",background = "red", 
                                                                       color = "white", font.weight = "bold") ) ) ), 
                               PMI = formatter("span",style = x ~ 
                                                   ifelse(x == 2.5, style(display = "block",`border-radius` = "4px",
                                                                          padding = "0 4px",background = "red", 
                                                                          color = "white", font.weight = "bold"), 
                                                          style(display = "block",`border-radius` = "4px",
                                                                padding = "0 4px",background = "green", 
                                                                color = "white", font.weight = "bold") ) )
                           )
  )
  
  nicetable
  </code></pre>
  
  <p><a href="https://github.com/sco-lo-digital/CityOfOakland/blob/master/Air.R" rel="nofollow">GithubRepo</a></p>