Reorganise scripts in R/ for clarity (inc simplify utils)
Simplify functions (there probably only needs to be one .get_start_row_*() function with an argument to specify which pre-table information you're trying to insert)
Rename suspect variables (table, content?)
De-nest where possible (break into intermediate variables)
Include more @noRd function docs
Sprinkle some more explanatory 'why' comments
Requires more thought/effort:
Would it be easier to handle pre-table content if the text of each row were put into a vector? Could then just check the length of that vector and insert the table at length(x) + 1, for example. At the moment there's repetitive checks for 'if blanks message was supplied, then ...', 'if source was supplied, then...'.
Drop-in replace {openxlsx2} for {openxlsx} (?) as per #70
'Simple' changes:
R/
for clarity (inc simplify utils).get_start_row_*()
function with an argument to specify which pre-table information you're trying to insert)table
,content
?)@noRd
function docsRequires more thought/effort:
length(x) + 1
, for example. At the moment there's repetitive checks for 'if blanks message was supplied, then ...', 'if source was supplied, then...'.Probably more.