Skip to content

RFC/WIP for fread comment.char#4486

Closed
MichaelChirico wants to merge 1 commit intomasterfrom
fread-comment
Closed

RFC/WIP for fread comment.char#4486
MichaelChirico wants to merge 1 commit intomasterfrom
fread-comment

Conversation

@MichaelChirico
Copy link
Member

Very simple version of how we could implement a comment.char argument for fread (#856). (just testing with a fixed comment.char='#' for now)

This addresses line-initial comments, but not line-trailing comments:

fread('a,b
#a comment
1,2
#another comment
3,4')
#       V1    V2
#    <int> <int>
# 1:     3     4

fread('a,b#line-trailing comment
1,2')
#        a b#line-trailing comment
#    <int>                   <int>
# 1:     1                       2

fread('a,b
1,2#trailing after numeric')
#        a                        b
#    <int>                   <char>
# 1:     1 2#trailing after numeric

Is this good enough to file as a solution for now? How common is the line-trailing use case? Any efficiency concern of this approach when comment.char is not used?

@MichaelChirico
Copy link
Member Author

Superseded by #7375

@MichaelChirico MichaelChirico deleted the fread-comment branch October 20, 2025 16:48
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.

1 participant