R Regex matching of mentions in twitts. with Power Query and R
✓ Published0🌍 Public
HHugoberry
Last edited Mar 9, 2017
Created on Mar 9, 2017
This example demonstrates how to extract regex-matched mentions (prefixed with `#` or `@`) from Twitter text using R within a Power Query workflow. The visualization shows the original tweets alongside a new `mention` column containing the first matched term. The solution uses the `R.Execute` function to run an R script that applies `regmatches` and `regexpr` with the pattern `[#@]\w+` across the `text` column. The R script processes the dataset provided by Power Query, leveraging R's base string manipulation functions. The data originates from a CSV file loaded via `Csv.Document`, with the final result passed back to Power Query through the `[Name="temp"]` output.
AI-generated description