similar to: Round down to earliest hour or half hour

Displaying 20 results from an estimated 1000 matches similar to: "Round down to earliest hour or half hour"

2011 May 05
6
Averaging uneven measurements by time with uneven numbers of measurements
I have a new device that takes measurements anywhere from every second, to every 15 minutes (depending on changes). The matrix has a date, time and Y column (Y is the measurement). For three days it is 25,000 rows. How do I average the measurements by every 30 minutes so my matrix is 48 rows per day? I have been working on this and cannot figure out a simple method. Any ideas? Thank you. ----- In
2011 May 12
3
assigning creating missing rows and values
I have a dataset where I have missing times (11:00 and 16:00). I would like the outputs to include the missing time so that the final time vector looks like "realt" and has the previous time's value. Ex. If meas at time 15:30 is 0.45, then the meas for time 16:00 will also be 0.45. meas are the measurements and times are the times at which they were taken. meas<-runif(18)
2006 Jul 18
4
How can I extract information from list which class is nls
Hello! I work with : R : Copyright 2006, The R Foundation for Statistical Computing Version 2.3.1 (2006-06-01) On Windows XP Professional (Version 2002) SP2. At this moment I use the function "nls" combined with a selfStar model (SSmicmen, related to Michaelis-Menten equation, and provided by the "stats" package). When I realise the following operation (cf. p 59 of the
2011 Oct 26
6
sometimes removing NAs from code
Sometimes I have NA values within specific columns of a dataframe (in this example, the first two columns can have NAs). If there are NA values, I would like them to be removed. I have been using the code: y<-c(NA,5,4,2,5,6,NA) z<-c(NA,3,4,NA,1,3,7) x<-1:7 adata<-data.frame(y,z,x) adata<-adata[-which(apply(adata[,1:2],1,function(x)any(is.na(x)))),] This works well if there are NA
2011 Feb 08
2
Plot where points are treatment letter
I would like to create a plot of y vs x with different treatments where the points are actually the letter of the treatment. Here is the code: A<-as.matrix(rnorm(10,10)) B<-as.matrix(rnorm(10,9.5)) C<-as.matrix(rnorm(10,10.5)) Y<-as.matrix(rnorm(30,13)) X<-rbind(A,B,C) nA<-matrix("A",10,1) nB<-matrix("B",10,1) nC<-matrix("C",10,1)
2011 May 12
1
separate date and time
I have a combined date and time. I would like to separate them out into two columns so I can do things such as take the mean by time across all dates. meas<-runif(435) nTime<-seq(1303975800, 1304757000, 1800) nDateT<-as.POSIXct(nTime, origin="1970-01-01") mat1<-cbind(nDateT,meas) means1<- aggregate(mat1$meas, list(nDateT), mean) This doesn't do anything as each day
2011 Nov 03
1
For loop to cycle through datasets of differing lengths
I have encountered this problem on several occasions and am not sure how to handle it. I use for-loops to cycle through datasets. When each dataset is of equal length, it works fine as I can combine the datasets and have each loop pick up a different column, but when the datasets are differing lengths, I am struggling. Here is an example: A<-1:10 B<-1:15 C<-1:18
2011 Feb 28
3
nls not solving
I am running the following nls equation. I tried it with data that excel was fitting and got the error: singular gradient matrix at initial parameter estimates I thought it was due to a low number of points (6), but when I create a dataset, I get the same problem. If I remove the parameter "a," then it can find a solution. Does anyone know what I can do to fit this model?
2011 Apr 18
3
Power Analysis
I am trying to do a power analysis to get the number of replicas per treatment. If I try to get the power it works just fine: setn=c(2,3) sdx=c(1.19,4.35) power.t.test(n = setn, delta = 13.5, sd = sdx, sig.level = 0.05,power = NULL) If I go the other way to obtain the "n" I have problems. sdx=c(1.19,4.35) pow=c(.8,.8) power.t.test(n = NULL, delta = 13.5, sd = sdx, sig.level = 0.05,
2011 May 10
2
need to delete by time, not date
I have a matrix where one column has a date and another column has a time. I need to delete all times before 6am. I had combined the Date and Time column into DateTime. Mat1: Weight Date Time 7.6 04/28/11 09:03 8.4 04/29/11 03:11 8.6 04/29/11 05:32 8.6 04/29/11 09:53 1.4 05/01/11 19:52 I tried just picking up the time: as.POSIXct(Mat1$Time, format = "%H:%M") but
2016 Jan 14
2
Strange index consistency issue
Olly Betts <olly <at> survex.com> writes: > > On Thu, Jan 14, 2016 at 11:04:29AM +0100, Jean-Francois Dockes wrote: > > Olly Betts writes: > > > On Sun, Jan 10, 2016 at 02:53:14AM +0000, Bob Cargill wrote: > > > > I will look into the bug you listed to see if it might be related. If there > > > > is anything else that I can do, please
2012 May 09
2
AD and SAMBA
Hello all, I am trying to understand how SAMBA finds nearest Domain Controller when configured to use Active Directory for AuthN. There are some great articles and wikis about how to configure SAMBA against AD, but couldn't find much on what I was looking for. For example 1. Does Samba have built in dc locator functionality like windows clients ? 2. What is the default authN it uses, NTLM
2011 Aug 26
1
Time Series data with data every half hour
I am working with data from the USGS with data every 30 minutes from 4/27/2011 to 8/25/2011. I am having trouble with setting the frequency. My R script is below: > shavers=read.csv("shavers.csv") > names(shavers) [1] "agency_cd" "site_no" "datetime" "tz_cd" "Temp" [6] "X04_00010_cd"
2012 Jul 19
1
Truncating (rounding down) to nearest half hour.
I couldn't find anything in the chron or timeDate packages, and a good search yielded rounding to the nearest half hour, which I don't want. The data: structure(list(Date = structure(c(1209625080, 1209641460, 1209652500, 1209676800, 1209682860, 1209692100, 1209706980, 1209722580, 1209726300, 1209739620, 1209762780, 1209765720, 1209770520, 1209791040, 1209812580, 1209829920,
2016 Jan 10
2
Strange index consistency issue
Olly Betts <olly <at> survex.com> writes: > > You could try: > > delve -t '' ./xapiandb > > That will list the document lengths, so you can see if document 6 is in > that list or not. I am the recoll user mentioned in the first post above. I still have a copy of the (potentially) corrupted index and I did the requested testing. I ran delve -t
2016 Jan 14
3
Strange index consistency issue
Olly Betts writes: > On Sun, Jan 10, 2016 at 02:53:14AM +0000, Bob Cargill wrote: > > I am the recoll user mentioned in the first post above. I still have a copy > > of the (potentially) corrupted index and I did the requested testing. > > > > I ran delve -t '' ./xapiandb on the index and it returned a very long list > > of document IDs, separated
2011 May 13
1
Plots: I've deleted axes, now to delete space
I am plotting 28 plots on one screen: par(mfrow=c(4,7)) for (i in 1:28) { a<-seq(1,3,1) plot(a,a, ann=FALSE) } I want a main title for all the plots (I tried using main but that doesn't work). I deleted the axes, but am not sure how to delete the space. There are such large margins between plots so the plots themselves are very small. If I delete the margins I can leave them all on one
2020 Aug 01
4
Boot failed on latest CentOS 7 update
Totally and completely on my HP microfiber. Wouldn't get past anything to even get me into the grub menu. NOT AMUSED! _______________________ Kay Schenk
2008 Aug 29
1
ggplot2: Changes to grobs not saved to file output
Hello, Maybe I missed something - most likely .:-( I create a gplot and then makes some changes to the plot using grid graphics functions. These changes show up on the display OK, but when I save using ggsave() the grid changes do not show up. How do I save the plot with these changes? Thanks in advance. -- View this message in context:
2004 Mar 30
2
earliest use of rsync?
Dear Folks, Is there a documented case of earliest use of rsync over internet? I presume rsync was used almost as soon as internet was invented as a file transfer and bandwidth efficient backup solution. If anyone has any information, please respond. -- Raghu Kulkarni