Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jan 3, 2018
Merged

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

merged 3 commits into from
Jan 3, 2018

Conversation

st-pasha
Copy link
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
@@ -11233,6 +11233,7 @@ unlink(f)
# 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
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
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
Copy link

codecov-io commented Jan 3, 2018

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