[R] Writing a function

vincent.stoliaroff@socgen.com vincent.stoliaroff at socgen.com
Mon Apr 28 12:18:51 CEST 2003


Hi r lovers,

I have written the following  function

> ClearDeltaBis
function(Matrix){
for (i in 1:3)
                        {
                        for (j in 1:2)
                                {if (is.na(Matrix[i,j]))
NA->(Matrix[i,j+1])}
                        }
Matrix
}

it looks correct but when I try to implement it on the MatCor Matrix I get
this error message

> ClearDeltaBis(MatCor)
Error: couldn't find function "(<-"

I don't understand where does it come from since I have no string like (<-
in my code


Thanks for any help that could be provided.





*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au 
titre de ce message s'il a ete altere, deforme ou falsifie.
				********
This message and any attachments (the "message") are confidentia... {{dropped}}



More information about the R-help mailing list