You may want to load the PerformanceAnalytics library
by using a command (in RStudio or as a part of Tableau script calc):
So when loading from Tableau, your calc would be as follows:
SCRIPT_REAL("library(PerformanceAnalytics); Return.annualized(.arg1,12)", SUM([Fund]))
I'm not sure about the scale you're using,
so I choose 12 as a second argument, meaning 12 months,
you'd be using a different number depend on a task.
Hope this could help a bit.
At least you've got a calc running,
not sure about the result obtained :-)
PS It's always wise to test your code in RStudio first,
then copy/paste the working script in Tableau calc.
Thank you Yuriy!! You have helped me before as well
Luciana, you're welcome.