Alter view data return? I am wondering if there is a way to do the following.

I need to alter view return data and either remove entries or keep entires based upon running some PHP.

Is there any easy way to do that? I was looking at the theme stuff, but that would mean I would nuke my pagination, is there anyway I could remove results but regenerate my pagination.

Sorry if this is confusing...

Edit: It's a little difficult to explain, but I am using Commerce. And I need to get a list of discounted products. But commerce only discounts products before they are displayed (ie there is no database I can join/where on to get discounted products). So I need to get all the products, then remove those that are not discounts.
You can use hook_views_data to alter view data like Commerce discounted products. As suggested by Clive, here is the patch which is implementing related feature:


Allow Views to sort / filter based on pre-calculated prices


Other hooks to consider which can allow to alter the views data are:


hook_views_query_alter,
hook_views_pre_render.