I have a problem with a very simple app in shinyapps. when I tried to load a csv into my app i have this error:
> Warning: Error in type.convert.default: invalid multibyte string at '<c9>cole <64>octorale Physique en <ce>le-de-France (Paris)
I think this is caused by some greek letters but I need them for my treatment.
Here is a reproducible exemple
data:
Austrian Academy of Sciences,Université Joseph Fourier - Grenoble 1,Institut polytechnique de Grenoble - Grenoble Institute of Technology,Institut National Polytechnique de Grenoble,Centre National de la Recherche Scientifique,Université Grenoble Alpes;Erich Schmid Institute of Material Sciences\, CD-Laboratory for Local Analysis of Deformation and Fracture,Science et Ingénierie des Matériaux et Procédés;Lisa Krämer,Verena Maier-Kiener,Yannick Champion,Baran Sarac,Reinhard Pippan;Activation volume and energy of bulk metallic glasses determined by nanoindentation;;Activation volume and energy of bulk metallic glasses determined by nanoindentation;2018-10;Materials and Design;;0264-1275;;;en;chim.mate;chim.mate;0.chim,1.chim.mate;;Thermal cycling,High pressure torsion,Bulk metallic glasses,Activation volume,Activation energy,Nanoindentation strain rate jump tests;;;• Nanoindentation strain rate jump tests of 3 BMGs and 3 BMGCs • Development of new method to determine activation energy and volume of shear transformation zones • Testing temperature strongly influences activation energy and volume • Rejuvenation (by HPT and thermal cycling) does not influence activation energy and volume G R A P H I C A L A B S T R A C T a b s t r a c t Nanoindentation strain-rate jump testing was used to determine activation volumes and energies of various metallic glasses and composites. Three different single phase metallic glasses and three composites (two with amor-phous/crystalline Cu and one with an amorphous/amorphous structure) were investigated. The state of the materials was additionally changed by varying the testing temperature between room temperature and 430 °C\, by performing high pressure torsion and by thermal cycling. The results show that testing temperature is the main parameter controlling activation volume and energy\, whereas material modifications by high pressure torsion and thermal cycling do not significantly affect them.;hal-01807726;https://hal.archives-ouvertes.fr/hal-01807726
I do not have this issue on my local machine
Here is a example of the app:
library(shiny)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
fileInput("file1", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv")
),
tags$hr(),
checkboxInput("header", "Header", TRUE)
),
mainPanel(
tableOutput("contents")
)
)
)
server <- function(input, output) {
options(shiny.maxRequestSize=32*1024^2)
output$contents <- renderTable({
# input$file1 will be NULL initially. After the user selects
# and uploads a file, it will be a data frame with 'name',
# 'size', 'type', and 'datapath' columns. The 'datapath'
# column will contain the local filenames where the data can
# be found.
inFile <- input$file1
if (is.null(inFile))
return(NULL)
read.csv(inFile$datapath, header = input$header,sep = ";")
})
}
shinyApp(ui, server)
The solution is to use
as.data.frame(data.table::fread(same parameter))