[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Plotting exercises for next Monday



Here is the thing I said I would work up for an exercise. If you have been building your R and LyX skills as hoped, it should be pretty easy. I'm giving you almost all of the code, after all.

This is in pdf format because I used a pretty fancy thing called "Sweave" to prepare the document.

http://lark.cc.ku.edu/~pauljohn/ps707/Rplotting.pdf

Sweave is a process that can make R work as a slave to the text processor, so that when you view the document, it calls R to fill in code results and graphs (unless you tell it not to show).

The file from which this comes is a lyx file, and you can open and read it. But you will not be able to process it through lyx because you don't have the fancy Sweave setup that I do. But I'm giving you the lyx file because it has the R-code in it. You might want to cut and paste the R code, to avoid re-typing.

http://lark.cc.ku.edu/~pauljohn/ps707/Rplotting.lyx

If you cannot figure how to extract the R code from that, I will try another route. There is a way to go from lyx to HTML (for making web pages), but this computer I'm using right now had that feature removed (I cannot remember why)

There's a faculty meeting this afternoon, so I won't be in the lab after 3 pm. I will go in before that, however, from, say, 1:30 to 3pm, and I will go in there Weds or Thurs if you email me and let me know when you need help. Of course, barring natural disaster, I'll be there Friday as usually promised.

--
Paul E. Johnson                       email: pauljohn_AT_ku.edu
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700