Cannot deploy ShinyApp: incomplete final line found by readTableHeader on 'raw' (Using default: en_US)
It took me quite some time to debug my application fluidrow by fluidrow but I eventually found out what was causing all the trouble !
I had been using both dplyr::filter(variable== input$variable)
and filter((variable == input$variable)
in my script until I realized their conflict was behind the malfunction of my shiny app.
https://github.com/STAT545-UBC/Discussion/issues/331#issuecomment-249048018
incomplete final line found by readTableHeader in R
This may not be optimal, but it works. stringi
's reliance on the ICU libraries makes it a great Swiss Army knife for overcoming encoding issues. When I saw that vim
could read the file appropriately, I decided to give it a go with stringi
:
library(stringi)
library(docxtractr)
stri_read_lines("23.txt") %>%
stri_split_fixed("\t", simplify = TRUE) %>%
as.data.frame(stringsAsFactors=FALSE) %>%
docxtractr::assign_colnames(1)
## old new
## 1 MAKFA МАКФА
## 2 makar макароны
## 3 макар. макароны
Incomplete final line found error when reading url using readLines() in R
Most files are missing an End of Line marker like a new line below, so I would just use warn=FALSE.
cat("abc\ndef\nhij", file="test.txt")
readLines( "test.txt")
# [1] "abc" "def" "hij"
# Warning message:
# In readLines("test.txt") : incomplete final line found on 'test.txt'
readLines( "test.txt", warn=FALSE)
# [1] "abc" "def" "hij"
Related Topics
Convert Accented Characters into Ascii Character
Use an Image as Area Fill in an R Plot
Overlay Geom_Points() on Geom_Boxplot(Fill=Group)
Set a Functions Environment to That of the Calling Environment (Parent.Frame) from Within Function
Existing Function for Seeing If a Row Exists in a Data Frame
Ggplot2: Fix Colors to Factor Levels
Download All Files from a Folder on a Website
How Does R Handle Unicode/Utf-8
R: Find Vector in List of Vectors
Annotate Values Above Bars (Ggplot Faceted)
Nested If Else Statements Over a Number of Columns
R: What's the How to Overwrite a Function from a Package
Grouping Every N Minutes with Dplyr
R: Calculate Cosine Distance from a Term-Document Matrix with Tm and Proxy
Ggplot2 Draw Individual Ellipses But Color by Group
R Grep Pattern Regex with Brackets
Use Rollapply and Zoo to Calculate Rolling Average of a Column of Variables