Regarding sqldf package/regexp function [duplicate]

▼魔方 西西 提交于 2019-11-28 14:35:37
G. Grothendieck

sqldf works with SQLite, h2, mysql and postgresql backends.

The default is SQLite and it does not support those functions. SQLite does support the regexp keyword if SQLite was compiled with support but I don't think the driver in the RSQLite package has done so.

If you use the postgreSQL database backend to sqldf then the ~ operator is available to do regexp matching and regexp_matches is available to extract matches.

See FAQ#12 on the sqldf home page for info on using the postgreSQL backend with sqldf.

See here for info on regular expression matching in postgreSQL.

In the future please provide complete minimal self contained reproducible examples in your questions which in this case means also providing a sample of the rows of cls, e.g. dput(head(cls)).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!