title: How can I get a table to print under a picture using a loop in a .rmd with word_document?
body: <p>I am trying to create a .rmd file that takes all of the pictures for a field day and the notes that was taken and create a report. I am able to get the pictures to plot but the no matter what I try the table with the notes does not want to print. Below is the loop I am utilizing:</p>
  <pre><code>for(i in 1:nrow(subset_Inventory_data)) {
    
  singlept &lt;- subset_Inventory_data[i,]
  
  picture &lt;- pictureLookup[singlept$GlobalID == pictureLookup$REL_GLOBAL,]
  
  #PRINT PICTURE
  plot(image_read(paste(baseURL,picture$UID,sep = &quot;&quot;)) %&gt;%
    # image_resize(&quot;400x400&quot;) %&gt;%
    image_rotate(degrees = 90)
  )
  
  #creating table underneath picture
  Categories &lt;- c(&quot;Latitude&quot;, &quot;Longitude&quot;, &quot;Road Width&quot;, &quot;Conditon&quot;, &quot;Lock Present&quot;,&quot;Additional Notes&quot;)
  
  sum_table &lt;- data.frame(Category = character(),
                          Information = character(),
                          stringsAsFactors = FALSE)
  
  sum_table &lt;- rbind(sum_table,Categories,
                     stringsAsFactors = FALSE)
  
  colnames(sum_table) &lt;- Categories
  
  sum_table$Latitude &lt;- sprintf(&quot;%f&quot;,singlept$LAT)
  sum_table$Longitude &lt;-sprintf(&quot;%f&quot;,singlept$LONG)
  sum_table$`Road Width` &lt;- paste(singlept$Gate_Width,&quot;feet&quot;)
  sum_table$Conditon &lt;- singlept$Condition
  sum_table$`Lock Present` &lt;- singlept$GlobalID
  sum_table$`Additional Notes` &lt;- singlept$General_Notes
  
  #TRIED FLEXTABLE
  ft &lt;- flextable(sum_table)
  ft &lt;- fontsize(ft, size = 12)
  ft &lt;- autofit(ft)
  print(ft)
  #TRIED KABLE
  print(kable(sum_table,&quot;latex&quot;))
  }
  </code></pre>