Skip to content

Unconsistent behavior in word function #245

@pgrandinetti

Description

@pgrandinetti

I don't get if the following behavior of the word function is desired, or is a bug

> words = "this is a very long sentence to test"
> word(words, start=-4, end=-1)  # last 4 words, OK
[1] "long sentence to test"
> word(words, start=-8, end=-1)  # OK
[1] "this is a very long sentence to test"
> word(words, start=-9, end=-1)  # OK, imho
[1] NA
> word(words, start=-10, end=-1)  # what is this?!
[1] "is a very long sentence to test" "a very long sentence to test"    "very long sentence to test"     
[4] "long sentence to test"           "sentence to test"                "to test"                        
[7] "test"    

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions