You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue using hot_col with a specified list of character elements, for some elements. In some cases, the column class is transformed to numeric despite a list of character elements is provided.
Minimal reproducible example:
library(rhandsontable)
shinyApp(
ui= basicPage(
tagList(
h4("Character transformed to numeric"),
rhandsontable::rHandsontableOutput("t1"),
verbatimTextOutput("o1"),
)
),
server=function(input, output, session) {
# transformed to numeric if the first two elements are selectedchar_source<- c("0001E","0006E","0002A")
output$t1<-rhandsontable::renderRHandsontable({
rhandsontable::rhandsontable(data.frame(character= c(rep(NA,5)))) %>%
rhandsontable::hot_col(col="character",type="dropdown",
source=char_source, format="character")
})
output$o1<- renderPrint({
str(rhandsontable::hot_to_r(input$t1))
})
}
)
In this example, the source is composed of character elements. If the first two elements are chosen ("0001E" or "0006E"), the column class is transformed to numeric. This does not happen if the last element is selected ("0002A") or if the data frame is initially defined with "" instead of NA.
Thank you for this nice package.
The text was updated successfully, but these errors were encountered:
I have an issue using
hot_col
with a specified list of character elements, for some elements. In some cases, the column class is transformed to numeric despite a list of character elements is provided.Minimal reproducible example:
In this example, the source is composed of character elements. If the first two elements are chosen ("0001E" or "0006E"), the column class is transformed to numeric. This does not happen if the last element is selected ("0002A") or if the data frame is initially defined with
""
instead ofNA
.Thank you for this nice package.
The text was updated successfully, but these errors were encountered: