Re: [R] Plots: I've deleted axes, now to delete space

2011-05-18 Thread Adele_Thompson
I've never used an R command without reading the documentation first. I think that would be impractical. I am not an expert at deciphering the documentation though and I post here because I did in fact read the documentation, do extensive google searches, ask friends/collegues and still find no

Re: [R] Plots: I've deleted axes, now to delete space

2011-05-16 Thread Adele_Thompson
Re-sizing within the dev command works well. I'm not sure why I would need the dev.off(). I have the plot commands run. Then I have the dev.copy2pdf command. Thanks again for your help. -Original Message- From: greg.s...@imail.org [mailto:greg.s...@imail.org] Sent: Monday, May 16, 2011

Re: [R] Plots: I've deleted axes, now to delete space

2011-05-16 Thread Adele_Thompson
I just saw this post: http://r.789695.n4.nabble.com/X11-plot-window-sizes-td900509.html where is explains that the window size cannot be larger than 85% of your screen. I'm not sure what you are referring to about the copying the whole region, not just the plot. Also, I remember using the width a

Re: [R] assigning creating missing rows and values

2011-05-13 Thread Adele_Thompson
This code works great. I will improve my descriptions of what I want in the future. Thanks for the help. -Original Message- From: gunter.ber...@gene.com [mailto:gunter.ber...@gene.com] Sent: Friday, May 13, 2011 03:44 PM To: Thompson, Adele - adele_thomp...@cargill.com Cc: dwinsem...@com

Re: [R] Plots: I've deleted axes, now to delete space

2011-05-13 Thread Adele_Thompson
Thanks all for the replies. I am getting better slowly but surely. I imagine that I will get better at figuring out things as well so I don't have to post as many questions. I do lots of searches, but still cannot figure out how to do everything that I need. The new code is as such: par(mfrow=c

Re: [R] Plots: I've deleted axes, now to delete space

2011-05-13 Thread Adele_Thompson
Easy fix. Under ?par, I don't see where I can enter an overall title. Should I add a text command or something? -Original Message- From: greg.s...@imail.org [mailto:greg.s...@imail.org] Sent: Friday, May 13, 2011 03:17 PM To: Thompson, Adele - adele_thomp...@cargill.com; r-help@r-project

Re: [R] assigning creating missing rows and values

2011-05-13 Thread Adele_Thompson
The problem with using cumsum, is that the measured output is the cumulative feed consumed throughout the day. When the animals do not eat for 30 minutes or so, it will not output a new value, but as soon as they do eat, the scale will weigh the difference and then output the cumulative feed eat

Re: [R] assigning creating missing rows and values

2011-05-12 Thread Adele_Thompson
I am still working on the weights problem. If the animals do not eat (like after sunset), then no new feed weight will be calculated and no new row will be entered. Thus, if I just use the previous value, it should be correct for how much cumulative feed was eaten that day up to that point. I wi

Re: [R] need to delete by time, not date

2011-05-10 Thread Adele_Thompson
Good deal. I will do that in the future. Thanks. -Original Message- From: dwinsem...@comcast.net [mailto:dwinsem...@comcast.net] Sent: Tuesday, May 10, 2011 10:45 AM To: Thompson, Adele - adele_thomp...@cargill.com Cc: r-help@r-project.org Subject: Re: [R] need to delete by time, not date

Re: [R] need to delete by time, not date

2011-05-10 Thread Adele_Thompson
Thanks, that did exactly what I wanted. I realize that I didn't put it in the best form, but was having trouble coming up with a replicable example. I see that many people here quickly create examples and I am learning how to do that, but still struggle, especially when using as.POSIXct and othe

Re: [R] need to delete by time, not date

2011-05-10 Thread Adele_Thompson
I am already using that to combine the date and time (I had it in the code, but took it out for the post to simplify it), but I still have the problem where I want to remove any time before 6am across all dates. -Original Message- From: cl...@ecy.wa.gov [mailto:cl...@ecy.wa.gov] Sent: T

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-09 Thread Adele_Thompson
An easy way to average every 30 minutes is using the aggregate function. First I use the mod (%%) to get times as the next earliest possible 30 min time increment. bTime<- as.POSIXct(c( "2011-04-28 09:02:00 CDT","2011-04-28 09:02:00 CDT","2011-04-28 09:12:00 CDT","2011-04-28 09:14:00 CDT","20

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-06 Thread Adele_Thompson
I figured out a poor way to do what I want. meas<-runif(30) times<-sort(runif(30)) timesdec<-seq(0,1,0.2) ltim<-length(timesdec) storing<-rep(0,ltim) for (i in 1:ltim) { if (i=1) {rowstart=1} else {rowstart<-findInterval(timesdec[i-1],times)+1} rowfinal<-findInterval(timesdec[i],times) storing[i]

Re: [R] create arrays

2011-05-06 Thread Adele_Thompson
Beautiful. -Original Message- From: greg.s...@imail.org [mailto:greg.s...@imail.org] Sent: Friday, May 06, 2011 02:17 PM To: Thompson, Adele - adele_thomp...@cargill.com; r-help@r-project.org Subject: RE: [R] create arrays ?seq -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center In

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-06 Thread Adele_Thompson
Here is an example of what I would like to do: meas = measurements times = time of measurement measf = measurements in final, reduced matrix timesf = time of measurement in final matrix meas<-runif(30) times<-sort(runif(30)) inputmat<-cbind(times,meas) names(inputmat)<-c("timef","measf") I would

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-06 Thread Adele_Thompson
Taking the final value for each 30-minute interval seems like it would get what I want. The problem is that sometimes this value would be 15 minutes before the end of the 30-minute interval. What would I use to pick up this value? -Original Message- From: ehl...@ucalgary.ca [mailto:ehl..