Bogaso Christofer wrote:
Hi, there is a function Skewness() under fBasics package. If I type
"skewness", I get followings:
Case matters in R, so please be precise.
skewness
function (x, ...)
{
UseMethod("skewness")
}
<environment: namespace:timeDate>
Would be great if someone tell me how to see the codes of this function.
That *is* the code of the function.
There are then further methods used for specific classes, which is
probably what you want to see.
For instance, look at the code of summary vs. summary.lm .
Try methods(skewness) to see which ones have been defined.
2ndly suppose I create following function:
fn1 <- function(x) return(x+2)
How I can make above kind of shape like, when user types "fn1" then he will
see:
fn1
function(x,.)
{
UseMethod("fn1")
}
I don't know what this means. You just have to define you function that
way. Use an actual text editor to write your functions, then send them
to R.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.