Rename column names in Rhandsontable inside render funtion

Is there a way to rename column names here in iris dataset inside render funtion. I mean if the column name is Species , then new column names should be "Category" and similarly for Petal.Width, it should be New.petal.width

title: "Untitled"
runtime : shiny
    orientation: columns
    vertical_layout: fill

```{r setup, include=FALSE}

Column {data-width=650}

### Chart A

output$table <- renderRHandsontable(rhandsontable(iris))
output$table <- renderRHandsontable(rhandsontable(rename(iris,

Perfect thanks a lot....

Hi Nir. Thanks a lot for the help. but I found 1 strange this. I am not able to change the name of Petal.Length if I add hot_col("Petal.Length", readOnly = FALSE, allowInvalid = TRUE). I get the error attempt to select less than one element in get1index

Below code for reference. Is there a way to rename Petal.Length also? Also may I know why I get this error?

output$table <- renderRHandsontable(rhandsontable(rename(iris,
                                                         "New.petal.width"=Petal.Width, "New.petal.length"=Petal.Length)) %>% hot_col("Petal.Length", readOnly = FALSE, allowInvalid = TRUE))

I've not used hot_col so don't know what it does but if you are trying to name petal length you should use the new name for it that you have it before you use hot col.
In other words in hot col you use an old name so it's not there.

1 Like