s-news
[Top] [All Lists]

Query: Beginer questions on writing functions

To: s-news@lists.biostat.wustl.edu
Subject: Query: Beginer questions on writing functions
From: "Arjun Bhandari" <arb.eu@adia.co.ae>
Date: Thu, 22 Aug 2002 12:57:03 +0400
Hi,

I am a beginer in writing my own functions / libraries and hence need to
get a few things sorted out before I can progress with my work.

1. How does one check if the correct number of arguments have been input.
     -  I tried to use the following set of statements
        value<-match.call(expand = F)
        if((value$y == NULL) || (value$x == NULL)) stop("Incorrect Number
of arguments to the function")
     - Error: No data to interpret as logical value: e1 || e2
                - I do not quite understand where I am going wrong.

2.  Matrix division: I want to get the syntax for solving equations AX=B
and that of XA=B. I get this from matlab but could not find a similar
function in splus. Would anyone know how to get around this.

Sorry for posting such basic questions, but getting stuck at these steps is
frustrating.

Best Regards
Arjun Bhandari





********************************************************************************
The contents of this mail are personal opinions of the Author.
ADIA disclaims all responsibility and accepts no liability, whatsoever.
********************************************************************************


<Prev in Thread] Current Thread [Next in Thread>