oracle_unnest_tokens: Split a column of an Oracle table into tokens

View source: R/oracle_unnest_tokens.R

oracle_unnest_tokensR Documentation

Split a column of an Oracle table into tokens

Description

A rip off of tidytext::unnest_tokens that will work on lazy Oracle tables. This function will retain all columns and add TOKEN_NUMBER and TOKEN columns to the table.

Usage

oracle_unnest_tokens(df, col, drop = TRUE, pattern = "[:space:]")

Arguments

df

Lazy Oracle table

col

Column to be tokenised

drop

Whether original input column should get dropped

regex

regex to tokenise by

Details

Inspiration: https://stackoverflow.com/questions/59537458/how-to-pipe-sql-into-rs-dplyr

Examples

## Not run: 
table_db %>% nhsbsaR::oracle_unnest_tokens(col = "DUMMY")

## End(Not run)


nhsbsa-data-analytics/nhsbsaR documentation built on Jan. 25, 2025, 8:54 a.m.