相关疑难解决方法(0)

比较两个字符串并查找差异并显示它们以便在 R 中查看(类似于 git diff)?

Suppose I have two rather long (>100k character) strings which are mostly identical but differ in some locations.

Git has the concept of a 'diff', which shows only the differences between two (text) files.

Is there anything similar in R, where I can provide two strings and have it return a very 'human readable' excerpt showing only the differences for easily and clear visual inspection?

Desired output

Preferably a simple function call that accepts two (similar) strings as arguments, looks …

r stringr

3
推荐指数
1
解决办法
311
查看次数

标签 统计

r ×1

stringr ×1