search for: mycurv

Displaying 3 results from an estimated 3 matches for "mycurv".

Did you mean: mysurv
2012 Feb 21
2
Using substitute in nested function calls
Dear List members, I really, like the feature that one can call R functions with mathematical expressions, e.g. curve(x^2, 0, 1) I wonder, how I can construct in a simple way a function like mycurve = function (expr) {...} such that that a call mycurve(x^2) has the same effect as the call curve(x^2, -100,100) Below is some code that works, but it seems much to complicated: it first substitutes and deparses the expression, creates a string with the new function call and then parses and...
2009 Aug 25
1
Help with nls and error messages singular gradient
Hi All, I'm trying to run nls on the data from the study by Marske (Biochemical Oxygen Demand Interpretation Using Sum of Squares Surface. M.S. thesis, University of Wisconsin, Madison, 1967) and was reported in Bates and Watts (1988). Data is as follows, (stored as mydata) time bod 1 1 0.47 2 2 0.74 3 3 1.17 4 4 1.42 5 5 1.60 6 7 1.84 7 9 2.19 8 11 2.17 I then
2006 Dec 15
1
xyplot: logarithmic y-axis
...to know). I therefore like to pass on the value logY to my custom panel.curve function. How do I do that? I think that the value of logY should go into xyplot that should pass it on to the panel function and then to the panel.curve function. Thanks, -Rene logY=TRUE # Custom panel.curve function myCurve <-function(x, log) { f <- ... # calculate curve here if (log==TRUE) f <- log10(f) return(f) } xyplot(Conc ~ Time | Subj, groups=Dose, data = mydata, as.table=TRUE, scales=list(y=list(log=logY)), panel = function(...) { panel.ab...