What is a simple way to convert a factor into a matrix of dummy variables?
fm-lm(y~f)
where f is a factor takes care of this in the estimation. I'd like to
save the result of expanding f into a matrix for later use.
Thanks.
Charles
--
Charles H. Franklin
Professor, Political Science
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
as R comments. Still... it seems easier to use brief comments in
the code itself and more explanatory text in the body of the document.
Searches of Sweave and comment in the list and documentation didn't
turn up anything about echoing comments in either R or Sweave.
Thanks.
Charles
--
Charles H
= function(x, y) {
panel.grid(h=-1, v= -1)
panel.xyplot(x, y, pch=1,col=2,cex=.7)
panel.loess(x,y, span=.65, lwd=2,col=4)
}, ) )
What am I missing?
Thanks!
Charles
/**
** Charles H. Franklin
** Professor, Political Science
On Tuesday 16 September 2003 22:00, Charles H. Franklin wrote:
xyplot doesn't seem to want to label my x-axis with dates but instead
puts
the day-number for each date.
...
What am I missing?
Deepayan Sarkar replies:
The fact that xyplot doesn't know anything about the date class. I'm
in Stata. Also,
Stata's ml check provides a nice test of your code before you loose it on
the data!
Gauss's maxlik routines would be another possibility, if you have or are
able to acquire Gauss.
Charles
/**
** Charles H. Franklin
** Professor, Political
then on R will always freeze with this error message.
I reinstalled 1.7.0 and it worked reliably for a couple of weeks or more,
but now once more has this problem.
Thanks.
Charles
/**
** Charles H. Franklin
** Professor, Political Science
** University