[R] problem reading from serial connection since 2.10.0

2009-12-29 Thread Tom Gottfried
Dear list, I have a balance connected to the serial port of a windows machine ("COM1") and I read the text output of the balance with scan("COM1", what="character", sep="\n", n=1) after calling the previous line I press the print key on the balance which triggers sending one line of text to th

Re: [R] how do I plot a regression curve with the data?

2009-10-28 Thread Tom Gottfried
?curve regards, Tom Ken Ervin schrieb: > I have a data set of 6 or so ordered pairs, and I've been able to graph > them and have decided to use a high-order polynomial regression. I've > used the following piece of code: > > regression <- function(x,y) { >x <- c(insert_numbers_here) >y

Re: [R] reset par() within plot layout

2009-10-24 Thread Tom Gottfried
I think it would be much easier to use grid-graphics for your task. It's made for such things. This is a good introduction: Paul Murrell. The grid graphics package. R News, 2(2):14-19, June 2002 Tom __ R-help@r-project.org mailing list https://stat.

Re: [R] Change positions of columns in data frame

2009-10-23 Thread Tom Gottfried
You can change the order of nearly everything just by applying an appropriate index and assigning to the original object. Something like data <- data[,order_of_columns] Tom Joel Fürstenberg-Hägg schrieb: > Hi all, > > Probably a simple question, but I just can't find a simple answear in the >

Re: [R] reset par() within plot layout

2009-10-23 Thread Tom Gottfried
Janke, Janke ten Holt schrieb: > Dear list, > > I would like to produce a matrix of plots, where par() is reset after > each plot (see below [simplified] example). When I use layout() to do > so, I seem to also reset the layout. I have not been able to figure out > how to prevent this from happen