In Read.Table(): Incomplete Final Line Found by Readtableheader

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



Leave a reply



Submit