dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.78k stars 229 forks source link

Crashing esquisse due to Error in badgeType: length(col_name) == length(col_type) is not TRUE #177

Closed aleruete closed 3 years ago

aleruete commented 3 years ago

Using the data.frame sent here https://www.dropbox.com/t/SlcY3pDpvmvHsy8u (link expiring 2021-09-02) I get a strange error Error in badgeType: length(col_name) == length(col_type) is not TRUE when calling esquisser(data = data_stat_data) but not when calling esquisser() and then uploading the data.

What is strange is that manually calling get_col_names() and col_type() wont result in different lengths.

Any idea why?

pvictor commented 3 years ago

Hello,

Ah yes weird one, that's because there only one row and when using [, drop = TRUE] it simplify the data.frame to a list :

data_stat_data[, , drop = TRUE]
# => return a LIST
data_stat_data_2 <- rbind(data_stat_data, data_stat_data)
data_stat_data_2[, , drop = TRUE]
# => return a DATA.FRAME

Should be fixed if you reinstall from GitHub.

Victor

aleruete commented 3 years ago

Thanks! it works!