I've created a small package which you can install with devtools::install_github('vituri/testencoding'). It has just two functions:
#' @export
hello_fixed <- function() {
x = iris
x$`Pétala` = 'Á'
x$`Mácula` = 'Ê'
x$`Pãõáéíóúçàâêô` = 'Ç'
x
}
#' @export
hello <- function() {
x = iris
x$Pétala = 'Á'
# x$Mácula = 'Ê'
# x$Pãõáéíóúçàâêô = 'Ç'
x
}
I've never had problems uploading packages where I deal with columns with accents, like in x$Pétala... until three days ago. I can't deploy any app which uses my packages now. If I put the column name around backticks as in hello_fixed, it works (but I would have to put backticks in all variables in all my packages, which I never needed until now.)
The following app runs fine locally:
library(shiny)
library(testencoding)
ui <- fluidPage(
tableOutput('tabela')
)
server <- function(input, output, session) {
output$tabela = renderTable({
hello()
})
}
shinyApp(ui, server)
but when I try to upload it to shinyapps, I get the following error:
[2021-11-24T17:26:26.292571220+0000] Building R package: testencoding (0.1.0)
/mnt/packages/build /mnt
Warning: unknown option '--vanilla'
Warning in untar2(tarfile, files, list, exdir, restore_times) :
skipping pax global extended headers
* installing to library '/opt/R/4.1.2/lib/R/library'
* installing *source* package 'testencoding' ...
** using staged installation
** R
Error in parse(outFile) :
invalid multibyte character in parser at line 14
ERROR: unable to collate and parse R files for package 'testencoding'
* removing '/opt/R/4.1.2/lib/R/library/testencoding'
################################# End Task Log #################################
Erro: Unhandled Exception: Child Task 1055795119 failed: Error building image: Build exited with non-zero status: 1
Execução interrompida
The exactly same app would work normally last week.
Anyone has a solution?