Giter VIP home page Giter VIP logo

Comments (3)

hadley avatar hadley commented on May 31, 2024

I have this in the docs for str_locate():

#' Vectorised over \code{string} and \code{pattern}. If the match is of length
#' 0, (e.g. from a special match like \code{$}) end will be one character less
#' than start.

Maybe it needs to be repeated in invert_match()? Or possibly invert_match() should be documented in the same file as str_locate()

from stringr.

AlunHewinson avatar AlunHewinson commented on May 31, 2024

If, as I understand, invert_match() is only intended for use with str_locate[_all] then maybe the documentation should be merged. Either way, I think it should be explicitly stated that the rows do not necessarily represent a "non match"
The Value section of the invert_match help says it returns a "numeric match giving locations of non-matches". This doesn't seem quite right; I wouldn't have said that there was a non-match between the two Ls in "HELLO".
As long as the user is made aware that there will be results that do not necessarily represent non-zero strings, (but perhaps you can word it better than that ;) ), they can take action on removing, if desired, those rows from the matrix.

from stringr.

hadley avatar hadley commented on May 31, 2024

Thanks for filing this bug report! Unfortunately since it doesn't seem to affect many people, and given that 7 years have elapsed since it was first filed, it's clear we don't have the development resources to fix at this time. It's our policy to close such issues to help stay focussed on the biggest problems, but the issue is still indexed by google, so if other people hit it, they'll be able to find it, and we can consider reopen it if it turns out to be a common problem. Thanks for reporting and I'm sorry we couldn't help more 😞.

from stringr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.