alexsanjoseph / compareDF

R Tool to compare two data.frames
Other
93 stars 17 forks source link

Error: invalid styles detected #5

Closed MichelEJD closed 7 years ago

MichelEJD commented 7 years ago

Hi,

I love this library and use it a lot!

Unfortunately, there is a number of times I get the following response: Message= "Invalid styles detected, one or more styles lack the needed style 'name: value': 'NA'" Call= prGetStyle(cell_style)

Any clue what goes wrong and how it can be fixed?

Thanks for your support.

Michel

alexsanjoseph commented 7 years ago

Hi Michel!

Can you show me a reproducable example? I have never seen this problem

MichelEJD commented 7 years ago

Hi Alex,

I will try to create an example. It happened to me with datasets I can't share, so let me try to create an anonymous example.

Michel

alexsanjoseph commented 7 years ago

Ah, I understand. Thanks for taking the effort.

MichelEJD commented 7 years ago

Hi Alex,

I did not get to an example file, but did notice the following: It occurs when one (or multiple) grouping columns are of type POSIXct and they contain NA values.

Hope this helps

Michel

alexsanjoseph commented 7 years ago

What does a POSIXct value of NA mean? Can you convert them to character vector and try?

MichelEJD commented 7 years ago

Hi Alex,

I tried to convert all to character (and character vector), but unfortunately keep running into the same error message.

MichelEJD commented 7 years ago

It is not restricted to specific grouping column types, I get these messages with any type of column: Creating comparison table... Truncating HTML diff table to 100 rows... Creating HTML table for first 100 rows Error in prGetStyle(cell_style) : Invalid styles detected, one or more styles lack the needed style 'name: value': 'NA'

alexsanjoseph commented 7 years ago

I'm not able to replicate this at all. Can you manually create a small example which has this problem?

MichelEJD commented 7 years ago

working on it :-)

MichelEJD commented 7 years ago

Alex,

I found it. Looks like a terrible user error.

I use a number of variables I read from an excel file. One of them is the max number of HTLM rows (vHtmlLimit). This sometimes is a string ("100") and then I get the error message described earlier. I now do an as.numeric on the variable and it works.

Sorry for this, but our conversation helped me finding the bug in my code.

Michel

alexsanjoseph commented 7 years ago

Ah okey, got it. Glad you solved the problem!

Closing the thread :)