I have moved this thread to the Tableau External Services area of the forums where other users of R venture more often in the forums. This reply will also bring this post to the top of the list. If you have not reviewed the resources for R in this area, then these resources may also be of great assistance.
Hello Karim Amjad
Given that the p-value is so small (3.8e-24), is it possible that it is getting rounded to 0 when you convert it to a string? Tableau should have no problem using aggregate numbers in your calculation. You can verify the data by printing your values to the console or writing them to a csv in your code as well.
What happens if you return it as a floating point number with a SCRIPT_REAL() calculation. Or alternatively try a combination of data that will generate a larger p-value?