Hi,
Why this function doesn't work?
function (x)
{
if (is.factor(x)) {
if (!is.ordered(x)) {
warning(La mediana non si puo' calcolare!!!)
return(NA)
}
me - median(unclass(x))
if (me - floor(me) != 0) {
warning(Mediana
Please give commented, minimal, self-contained, reproducible code. In
this case, not only the function definition, but a simple example
showing *how* it does not work, and what you were expecting it to do!
Angelo Scozzarella wrote:
Hi,
Why this function doesn't work?
function (x)
{
if
- Messaggio originale -
Da: Angelo Scozzarella [EMAIL PROTECTED]
A: r-help@r-project.org
Inviato: Martedì 22 luglio 2008, 20:51:05
Oggetto: [R] Function Error
Hi,
Why this function doesn't work?
function (x)
{
if (is.factor(x)) {
if (!is.ordered(x)) {
warning(La
At a first guess, because you are missing a right paren in thereturn()
statement of the final else section.
Otherwise, we'd need to know about what doesn't work means -
what is x supposed to be? What do you want the function to do?
What error messages are you getting?
You haven't provided any of
4 matches
Mail list logo