Skip to content

Commit 1c44694

Browse files
author
Toby Dylan Hocking
committed
dateTimeAs arg, invalid quoting works anyway examples
1 parent e51746b commit 1c44694

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

vignettes/datatable-fread-and-fwrite.Rmd

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,19 @@ Use `skip="string"` in `fread` to search for a line containing a substring (typi
195195

196196
Supported Scenarios:
197197
- Unescaped quotes inside quoted fields
198-
e.g., `"This "quote" is invalid"` — supported as long as column count remains consistent.
198+
e.g., `"This "quote" is invalid, but fread works anyway"` — supported as long as column count remains consistent.
199+
200+
```{r}
201+
data.table::fread(text='x,y\n"This "quote" is invalid, but fread works anyway",1')
202+
```
199203

200204
- Unquoted fields that begin with quotes
201205
e.g., `Invalid"Field,10,20` — recognized correctly as not a quoted field.
202206

207+
```{r}
208+
data.table::fread(text='x,y\nNot"Valid,1')
209+
```
210+
203211
Requirements & Limitations:
204212
- Escaping rules and column counts must be consistent throughout the file.
205213

@@ -232,7 +240,7 @@ fwrite(dt_quoting_scenario, temp_quote_adv)
232240
cat(readLines(temp_quote_adv), sep = "\n")
233241
```
234242

235-
### 2.2 Fine-Grained Date/Time Serialization (dateTimeAs)
243+
### 2.2 Fine-Grained Date/Time Serialization (`dateTimeAs` argument)
236244

237245
Offers precise control for POSIXct/Date types:
238246

0 commit comments

Comments
 (0)