In this code, when out_switch!="table", the code looks like it should show both a table and a plot. However, when this is knit to html, the 2nd object (zone_out$plot) overwrite the first (zone_out$table). So, you cannot get both a table and a plot in the same chunk of r code.
I think it is not possible for Rmarkdown to have both a table and a figure in single code chunk.
I have a ugly ish fix. Set a logical based on the value of out_switch and then evaluate the next code chunk based on that logical.
See 87bc343272eb77e7a011f87121756221012fa1e6
@mchaji : Can you propagate this fix to the relevant code chunks in the tiny report?
https://github.com/NEFSC/READ-SSB-CHAJI-Effort-Displacement---Scallop/blob/7b41af8889251f86f0561edece3540ed4a8c7047/analysis_code/scallop_analysis_tiny_report.Rmd#L643-L671
In this code, when
out_switch!="table"
, the code looks like it should show both a table and a plot. However, when this is knit to html, the 2nd object (zone_out$plot) overwrite the first (zone_out$table). So, you cannot get both a table and a plot in the same chunk of r code.I think it is not possible for Rmarkdown to have both a table and a figure in single code chunk.
I have a ugly ish fix. Set a logical based on the value of out_switch and then evaluate the next code chunk based on that logical.
See 87bc343272eb77e7a011f87121756221012fa1e6
@mchaji : Can you propagate this fix to the relevant code chunks in the tiny report?