1 of 1 people found this helpful
Currently everything passed to R needs to be in the viz with the level of detail set correctly. This is something we are thinking about improvements to in the long term, ie allowing data to be returned to Tableau that has a different shape than the data passed.
In the short term, you can use table calculations to visually filter results to only show one p-value per category as detailed here: https://kb.tableau.com/articles/howto/filtering-view-without-filtering-underlying-data
Using the Script function, and having all required values on the view, you can pass them to R and use a table calc filter to only show one result for each category.