File tree Expand file tree Collapse file tree 2 files changed +22
-14
lines changed
Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -150,13 +150,13 @@ gt_okpi <- function(data,
150150 )
151151 # # Format spanner headers
152152 # gt::tab_style(
153- # style = list(
154- # gt::cell_text(
155- # font = chosen_font,
156- # weight = "bold",
157- # size = "larger"
158- # )
159- # ),
153+ # style = list(
154+ # gt::cell_text(
155+ # font = chosen_font,
156+ # weight = "bold",
157+ # size = "larger"
158+ # )
159+ # ),
160160 # locations = gt::cells_column_spanners()
161161 # )
162162
Original file line number Diff line number Diff line change @@ -101,13 +101,21 @@ ojo_gt_captions <- function (x,
101101 # Do we want to build any more QOL stuff into this? Like we could set it up
102102 # so that it automatically decides when to display an axis label, formats
103103 # those to be title case, etc.
104- x <- x | >
105- gt :: tab_footnote(
106- ojo_source_text(source = source )
107- ) | >
108- gt :: tab_footnote(
109- ojo_analyst_name_text(analyst_name = analyst_name )
110- ) | >
104+ if (! is.na(source )){
105+ x <- x | >
106+ gt :: tab_footnote(
107+ ojo_source_text(source = source )
108+ )
109+ }
110+
111+ if (! is.na(analyst_name )){
112+ x <- x | >
113+ gt :: tab_footnote(
114+ ojo_analyst_name_text(analyst_name = analyst_name )
115+ )
116+ }
117+
118+ x <- x | >
111119 gt :: tab_style(
112120 style = gt :: cell_text(align = " right" ),
113121 locations = list (gt :: cells_source_notes(), gt :: cells_footnotes())
You can’t perform that action at this time.
0 commit comments