Skip to content

Fix case nrows=0 on a 1-row input - #2525

Merged
mattdowle merged 3 commits into
masterfrom
issue2512
Jan 3, 2018
Merged

mattdowle merged 3 commits into
masterfrom
issue2512

Conversation

@st-pasha

Copy link
Copy Markdown
Contributor

Closes #2512

@st-pasha st-pasha added the fread label Dec 14, 2017
@st-pasha st-pasha added this to the v1.10.6 milestone Dec 14, 2017
@st-pasha st-pasha self-assigned this Dec 14, 2017
Comment thread inst/tests/tests.Rraw Outdated
# quoted fields followed by whitespace, #2520
test(1858, fread('B,C\n"12" ,15\n"13" ,18\n"14" ,3'), data.table(B=c(12L, 13L, 14L), C=c(15L, 18L, 3L)))

test(1859, fread("A\n", nrows=0), data.table(A=c(T))[0,]) # 2512

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never use T in R. Always TRUE in full. The reason is that T is just a symbol in base. All symbols can be assigned any value, such as FALSE (!). In contrast, TRUE is a reserved symbol in the language itself: it is not possible to assign to or mask the symbol TRUE.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, good to know.

@codecov-io

codecov-io commented Jan 3, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #2525 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2525      +/-   ##
==========================================
+ Coverage   91.44%   91.45%   +<.01%     
==========================================
  Files          63       63              
  Lines       12070    12071       +1     
==========================================
+ Hits        11038    11039       +1     
  Misses       1032     1032
Impacted Files Coverage Δ
src/fread.c 95.97% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8458775...4d0df58. Read the comment docs.

@mattdowle
mattdowle merged commit 2a9ce61 into master Jan 3, 2018
@mattdowle
mattdowle deleted the issue2512 branch January 3, 2018 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants