Skip to content

Commit fe2b74b

Browse files
committed
match read.table for na.strings and comment.char
1 parent 9416006 commit fe2b74b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

inst/tests/tests.Rraw

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21769,10 +21769,13 @@ test(2341.16, fread('a#b
2176921769
# only comment', sep="#", comment.char="#"), data.table(a=1L))
2177021770

2177121771
# na.strings
21772-
test(2341.17, fread('v
21772+
txt = 'v
2177321773
#NA
2177421774
1
21775-
# comment', na.strings="#NA", comment.char='#'), data.table(v=1L))
21775+
# comment'
21776+
writeLines(txt, tmp <- tempfile())
21777+
test(2341.17, fread(tmp, na.strings="#NA", comment.char='#'), data.table(v=1L))
21778+
test(2341.175, fread(tmp, na.strings="#NA", comment.char='#'), setDT(read.table(tmp, na.strings="#NA", comment.char='#', header=TRUE)))
2177621779

2177721780
test(2341.18, fread('a,b
2177821781
"p#q",2 # tail

0 commit comments

Comments
 (0)