Displaying 4 results from an estimated 4 matches for "plotfunc".
Did you mean:
plotfun
2012 Dec 09
1
defmacro and bwplot incompatibilities?
My macro doesn't work for bwplot. But is working elsewhere.
What changes should i make to fix my macro.
Thanks.
The complete code sample is:
library(gtools)
library(lattice)
pic <- defmacro(fn, plotfunc, expr={png(filename=fn); plotfunc; dev.off()})
# this one fails.
pic("bw.png", {bwplot(Species ~ Sepal.Length, data=iris)})
# this one works
pic("p.png", {plot(iris$Sepal.Length)}
2008 May 30
1
Get all X iterations in optim output when controls(trace=6)
Hi,
I would like to get all X iterations in optim output in matrix form.
I know about the follow approach:
sink("reportOptim")
optim( ......., control=list( trace=6,..........) )
sink()
all_iterOptim <- readLines("reportOptim")
unlink("reportOptim")
all_iterOptim <- all_iterOptim[ grep( '^X', all_iterOptim ) ]
### TODO: the rest !!! :-)
But it is very
2005 Apr 14
2
Display execution in a function
Dear all,
Here is a simplified version of a function I made:
############
plotfunc<-function(x){
#x a vector
cat("please select two points","\n")
plot(x)
points<-locator(2)
return(points)
}
############
Using R version 1.01 for mac os x (aqua GUI)
I would like to know what should I do to make
sure that my text line will be printed prior to
the drawi...
2002 Mar 05
0
Improved HTML Reporting Functions
...report(swiss.lm,swiss.report)
report(summary(swiss.lm),swiss.report)
report(swiss.aov,swiss.report)
report(summary(swiss.aov),swiss.report)
# a simple plot
report.plot("fit1.png",formula(swiss.lm),swiss.report)
# a more complex plot
report.plot("fit2.png",swiss.lm,swiss.report,plotfunc=function(x) {
plot(formula(swiss.lm))
abline(swiss.lm)
})
# all done
report.end(swiss.report)
-------------- next part --------------
source("html.r")
require(xtable)
# simple report writing to html functions
# This creates a new report object, which must be passed to all
# of t...