Skip to content
Back to formatted view

Raw Message

Message-ID: <20250916001332.6a242fe1@Tarkus>
Date: 2025-09-15T21:13:32Z
From: Ivan Krylov
Subject: trouble with exporting a data.frame with " (quotation mark) in some columns into a tab delimited file, then importing the file
In-Reply-To: <afa799bc-20a9-447c-b180-a8b112612b7a@univ-fcomte.fr>

? Sun, 14 Sep 2025 21:31:43 +0200
Patrick Giraudoux <patrick.giraudoux at univ-fcomte.fr> ?????:

> Errorin write.table(db, file = "db.txt", row.names = FALSE, quote =
> "", : invalid 'quote' specification

write.table() and read.table()/read.delim() are a bit asymmetric. In
this case, write.table() needs quote = FALSE, but read.delim() needs
quote = "":

write.table(db, "db.txt", row.names = FALSE, quote = FALSE, sep = "\t")
db_import <- read.delim("db.txt", quote = "")

-- 
Best regards,
Ivan