Please check the result of SummaryRprof in your R environment.As Rprof is a sample based profiler, it might be that the very simple code you used for the example did not actually make it into any samples.
The R documentation contains the details on R and RProf. Please check these for details.
As for the type mismatch: result2 in your example is a numeric scalar, while the output type DUMMY_2 is a table type.
With cbind() you can turn your result2 into a table typed value.