[R] Integrate function

2008-12-22 Thread glenn roberts
Quick One if any one can help please. On use of integration function Œintegrate¹; how do I get the function to return just the value with no messages please Glenn [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:

[R] NLS problem

2008-12-18 Thread glenn roberts
Would appreciate some help on this problem please: Using nls to solve for 5 parameters to a set of data, and for particular mixes of the parameters the function can yield NaN and infinity returns. Is is making nls fall over ­ I have tried starting values, lower and upper bounds to no avail. New t

[R] Newbie "if" problem

2008-12-17 Thread glenn roberts
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 statem

[R] Applying a function to a dataframe

2008-12-16 Thread glenn roberts
Another Newbie Question sorry: I am trying to apply a function a dataframe and could use some help: Assuming, dim(df) = (10,2) say, I would like to apply a function that looks at each row in turn and returns a list (dim =(10,1)) using the columns as inputs to the function, but with no INDEX stuf

[R] Rookie nls question

2008-12-15 Thread glenn roberts
First of many Rookie questions sorry: Finally broke free of Mathematica and gone for real OO programing, and up 2 grand a year to boot ! Problem concerns the use of nls function mostly but I have used an example from finance that is similar to my aim: Using an fOptions PlainVanillaOptions functio