Skip to content

wb_dims: Error in wb_dims(rows = 2:(nrow(data_in) + 1), cols = sel_columns) : You must supply positive, consecutive values to cols #844

Answered by Rapsodia86
Rapsodia86 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok,
I get the potential problem. Using the occasion, I would like to ask about the rule in add_conditional_formatting()
My wb is created based on dataframe, which has NAs, and so I do not want ⁠#N/A⁠ in my workbook.
wb$add_data(my_var, data_in, na.strings = NULL)
When I apply a different rule:

   wb$add_conditional_formatting(my_var, dims = wb_dims(x = data_in, cols = i), 
   rule = "<= 0.5", style = "positive")

Those empty cells are also colored.
I know I can add yet add_conditional_formatting like:

wb$add_conditional_formatting(my_var, dims = wb_dims(x = data_in, cols = i), rule = '= ""', style = "empty")

So, I was wondering if I could apply a rule with a condition within? Or maybe I…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@Rapsodia86
Comment options

@JanMarvin
Comment options

@Rapsodia86
Comment options

@JanMarvin
Comment options

@Rapsodia86
Comment options

Answer selected by Rapsodia86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #843 on November 08, 2023 21:54.