0

This question is similar to this. I am trying to figure out what the function does, but I still cannot see the source code of SharpeR:::as.markowitz. I tried, without success:

getAnywhere("as.markowitz")
  getS3method("as.markowitz")
  methods("as.markowitz","SharpeR")
  methods(class="as.markowitz")
  methods("as.markowitz")

Is there other ways to see the source?

Robert
  • 5,038
  • 1
  • 25
  • 43

1 Answers1

1

This is because methods for as.markovitz are not registered properly in the package namespace. Normally, this should work:

with(asNamespace("SharpeR"), methods("as.markowitz"))

Use ls to list all the functions in the package, and get to show the code:

ls(asNamespace("SharpeR"), all = TRUE)
get("as.markowitz.default", asNamespace("SharpeR"))
Kamil Bartoń
  • 1,482
  • 9
  • 10