I have got a general problem when applying a function to a dataframe using
the function;
Apply(df,1,myfunct)
Where myfunct has an IF statement in it along the lines of;
If (z == 0)
X = 1
If (z ==0)
Z = 1
I.e. Two If statements
Is there something I am missing or have a just formed the if statements
wrong just checking there is not some trick you have to use when using
apply with functions with if statements in.
The function works fine in isolation with df[1,.] say
Thanks
Glenn
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.