[R] Matrix of dummy variables from a factor

2005-12-06 Thread Charles H. Franklin
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] [Fwd: Re: Matrix of dummy variables from a factor]

2005-12-06 Thread Charles H. Franklin
__ 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

Re: [R] Matrix of dummy variables from a factor

2005-12-06 Thread Charles H. Franklin
__ 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] Sweave and echoing R comments

2004-06-20 Thread Charles H. Franklin
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

[R] Date on x-axis of xyplot

2003-09-16 Thread Charles H. Franklin
= 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

RE: [R] Date on x-axis of xyplot

2003-09-16 Thread Charles H. Franklin
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

RE: [R] How robust is mle in R?

2003-07-13 Thread Charles H. Franklin
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

[R] R 1.7.0 startup error: .addMethodFrom...

2003-06-12 Thread Charles H. Franklin
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