For example, based on a certain condition, I may want to exit my code early:

 

            # Are there the same number of assets in "prices" and
"positions"?

            if (nAssetPositions != nAssetPrices) {

                        cat("Different number of assets! \n\n")

                        <exit function>

            }

 

I have searched, but not found, a way of forcing a function to exit.  Any
help greatly appreciated.


	[[alternative HTML version deleted]]

