when I import my .txt data I get the following error message:
"3: In fread(text = .) :
Discarded single-line footer: <<"2306956";1;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;"22-208-2082-83";2008-11-07;"208";2082;0;NA;0"2306957";12;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;"22-208-2082-43";2008-11-07;"208";2082;0;NA;0"2306958";13;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;"22-208-2082-34";2008-11-07;"208";2082;0;NA;0"2306959";22;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;"22-208-2082-58";2008-11-07;"208";2082;0;NA;0"2306960";33;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;NA;"22-208-2082-75";2008-11-07;"208";2082;1;2009->>"
The result is, that there will be missing data (Some entries are NA) in my tibble. Does anyone know where the problem is? I've already tried "In fread(text = ., fill = TRUE). Btw, I don`t need the first column.
My code is:
T22 <- read_file("Einzelteil_T22.txt") %>% #Textdatei einlesen
str_replace_all(. , 'NA\"', 'NA"\"') %>% #Ersetzen des Trennsymbols "" durch neue Zeile
str_replace_all(. , '\t', ';') %>%
str_replace_all(. , '\"\"', '\n\"') %>%
fread(text = .) %>% #Einlesen der neu strukturierten Daten in R-Studio
as_tibble() #formatiert urspr?nglichen data.table-Dateityp in tbl_df Dateityp
colnames(T22)[23] <- "Fehlerhaft_Fahrleistung"
T22$V1 <- NULL