Skip to content

Fixed outdated example in reshape vignette#7150

Merged
tdhock merged 7 commits intomasterfrom
issue
Jul 11, 2025
Merged

Fixed outdated example in reshape vignette#7150
tdhock merged 7 commits intomasterfrom
issue

Conversation

@venom1204
Copy link
Copy Markdown
Contributor

closes #6524

This PR addresses the issue #6524

changes i made -

  • Replaced Date Columns with Name Columns: In the example starting in Section 2, the dob_child columns have been replaced with name_child columns containing character data. This successfully re-introduces the character-integer conflict.
  • Updated Example Output: The comment in the example's output now correctly states that the gender column is coerced to character, reflecting the restored behavior.
  • Ensured Code Consistency: All subsequent code blocks that build upon this example have been updated to use the new name_child columns.

hi @MichaelChirico can you please have a look when you have time .
thanks

@venom1204 venom1204 requested a review from tdhock as a code owner July 10, 2025 07:29
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.50%. Comparing base (0e5f928) to head (7ffce5e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7150   +/-   ##
=======================================
  Coverage   98.50%   98.50%           
=======================================
  Files          81       81           
  Lines       15032    15032           
=======================================
  Hits        14808    14808           
  Misses        224      224           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread vignettes/datatable-reshape.Rmd
Comment thread vignettes/datatable-reshape.Rmd Outdated
5 29 2000-12-05 2005-02-28 NA 2 1 NA"
s2 <- "family_id age_mother name_child1 name_child2 name_child3 gender_child1 gender_child2 gender_child3
1 30 'Ben' 'Anna' NA 1 2 NA
2 27 'Tom' NA NA 2 NA NA
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.

please use consistent indentation so data are easier to read.

Copy link
Copy Markdown
Contributor Author

@venom1204 venom1204 Jul 10, 2025

Choose a reason for hiding this comment

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

Thanks for pointing that out! I've updated the indentation for better readability.
Please take a look whenever you have a moment.
thanks.

Comment thread vignettes/datatable-reshape.Rmd Outdated
s2 = "family_id age_mother name_child1 name_child2 name_child3 gender_child1 gender_child2 gender_child3
1 30 Ben Anna NA 1 2 NA
2 27 Tom NA NA 2 NA NA
3 26 Lia Sam Amy 2 2 1
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.

original text uses right justification for each column.
your text sometimes uses right (gender_child2) and sometimes left (name_child2).
please change left to right justification for consistency.

@venom1204 venom1204 requested a review from tdhock July 10, 2025 11:52
@tdhock
Copy link
Copy Markdown
Member

tdhock commented Jul 10, 2025

please use a more informative and specific commit message than "Update datatable-reshape.Rmd"

please click Files Changed tab and ensure indentation / spacing / alignment is consistent before and after.

@venom1204
Copy link
Copy Markdown
Contributor Author

Hi @tdhock,
A quick clarifying question: When I run the code locally, the printed data.table always looks aligned, which has been my point of confusion.
Just to confirm, is your feedback about the alignment of the text inside the string (i.e., s2) and not about how the data is printed after using fread().
If so, does this new version now meet the right-justification and alignment requirements?

@tdhock
Copy link
Copy Markdown
Member

tdhock commented Jul 11, 2025

yes that is great thanks!

@tdhock tdhock merged commit 40303ce into master Jul 11, 2025
11 checks passed
@jangorecki jangorecki deleted the issue branch September 27, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisit reshaping example possibly outdated by fread recognizing dates

2 participants