search for: mytim

Displaying 20 results from an estimated 26 matches for "mytim".

Did you mean: mytime
2011 Feb 14
3
how to order POSIXt objects ?
...include as much info as possible below. The problem stems from trying to read in times from a CSV file. I have converted the character time values to a POSIXt object using the STRPTIME function. I would like ideally to sort using the order function as below. test.sort <- order(test$DATE, -test$mytime) However, when I try this I receive the error as below : Error in `-.POSIXt`(test2$mytime) : unary '-' is not defined for "POSIXt" objects To make this easier to understand I have pasted my example data below with a list of R commands I have used. Any help or assistance wo...
2008 Apr 15
1
by inconsistently strips class - with fix
...h it is applied. quick reason: tapply strips class when simplify is set to TRUE (the default) due to the class stripping behaviour of unlist. quick answer: This can be fixed by invoking tapply with simplify=FALSE, or changing tapply to use do.call(c instead of unlist executable example: mytimes=data.frame(date = 1:3 + Sys.time(), set = c(1,1,2)) by(mytimes$date, mytimes$set, function(x)x) INDICES: 1 [1] "2008-04-15 11:41:38 BST" "2008-04-15 11:41:39 BST" ---------------------------------------------------------------------------------------- INDICES: 2 [1] "20...
2009 Aug 13
3
Finding minimum of time subset
...very few seconds. I would like to subset the data to retain only the data taken on the quarter hour, and as close to the quarter hour as possible. So far I have figured out how to subset the data to the quarter hour, but not how to keep only the minimum time for each quarter hour. For example: mytime<-c("12:00:00","12:00:05","12:15:05","12:15:06","12:20:00","12:30:01","12:45:01","13:00:00","13:15:02") subtime<-grep(pattern="[[:digit:]]+[[:punct:]]00[[:punct:]][[:digit:]]+|[[:digit:]]+[[:punct:]...
2008 Oct 13
3
lattice panel question
...the conditioning) to our own set of label? for example: someStuff <- data.frame(area = rep(c("SOUTH", "NORTH", "EAST", "WEST"), each = 25), group = rep(c("A","B","C","D"), each = 5), mytime = rep(1:4), val1 = sample(1:100, size=100, replace=TRUE), val2 = sample(1:100, size=100, replace=TRUE) ) xyplot(val1+val2 ~ mytime | area * group, data = someStuff, type = c("a", "p", "g")) I want to change each panel label/te...
2020 Mar 10
2
Fwd: Windows upssched does not work
...TT * START-TIMER onbattwarn 30 AT ONLINE * EXECUTE ups-back-on-line AT ONLINE * CANCEL-TIMER onbattwarn --- notify.cmd @ECHO OFF For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%b.%%a.%%c) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b) echo [%mydate%-%mytime%] %1 %2 %3 %4 >> C:\\NUT\\notify.log --- output in notify.log [10.03.2020-10:56 AM] "UPS ups_1000 at 192.168.3.95 on battery" [10.03.2020-11:00 AM] C:\NUT\notify.cmd "UPS ups_1000 at 192.168.3.95 on line power" [10.03.2020-11:15 AM] "...
2008 Apr 14
3
Logistic regression
Dear all, I am trying to fit a non linear regression model to time series data. If I do this: reg.logis = nls(myVar~SSlogis(myTime,Asym,xmid,scal)) I get this error message (translated to English from French): Erreur in nls(y ~ 1/(1 + exp((xmid - x)/scal)), data = xy, start = list(xmid = aux[1], : le pas 0.000488281 became inferior to 'minFactor' of 0.000976562 I then tried to set the 'minFactor' value li...
2011 Aug 31
1
formatting a 6 million row data set; creating a censoring variable
...F D 2 11 F D 2 12 F D 2 13 F D 2 14 M A 3 15 M A 3 16 M A 3 17 M B 3 18 M B 3 19 M B 3 20 M A 4 Here is the reshaping I am seeking (explanation below). id mygroup mytime censor [1,] 1 A 1 1 [2,] 2 B 3 0 [3,] 2 C 3 0 [4,] 2 D 6 1 [5,] 3 A 3 0 [6,] 3 B 3 1 [7,] 4 A 1 1 I need to create 2 variables. The first one is a time variable. Observe that for...
2004 Jun 22
2
ts & daily timeseries
I have defined a daily timeseries for the 365 days of 2003 issuing: myts = ts(dati[,2:10],frequency=365,) > myts Time Series: Start = c(1, 1) End = c(1, 365) Frequency = 365 and mytime = as.POSIXct(strptime(as.character(dati[,1]),format="%Y-%m-%d")) contains the dates from "2003-01-01" to "2003-12-31" How can I combine mytime and myts in order to list the timeseries according to the more natural 2003-01-01 xxxxx xxxxx xxxxx ...... 2003-01-...
2020 Mar 10
0
Fwd: Windows upssched does not work
...AT ONLINE * EXECUTE ups-back-on-line > AT ONLINE * CANCEL-TIMER onbattwarn > > --- notify.cmd > @ECHO OFF > For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%b.%%a.%%c) > For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b) > echo [%mydate%-%mytime%] %1 %2 %3 %4 >> C:\\NUT\\notify.log I don't recognise this language, but the notifications should probably be called from your script sched.cmd if you call the upssched binary. > --- sched.cmd > @ECHO OFF > For /f "tokens=2-4 delims=...
2009 May 04
1
how to remove ( ) ? when using write.csv(chron.object)
Hello all, I don' like to have ( ) around my datetime, when send the csv file to somebody. How to remove it? >library(chron) >mydate <- c("2009-05-03","2009-06-07") >mytime <- c("10:30:00","10:20:00") >mydatetime <- chron(dates=mydate,times=mytime,format=c("y-m-d","h:m:s")) >write.csv(mydatetime)   "","x" "1",(09-05-03 10:30:00) "2",(09-06-07 10:20:00)   thanks! Jeff...
2012 Jan 26
2
Inserting a character into a character string XXXX
Hello everyone, I have a character vector of 24 hour time values in the format hm without the delimiting ":". How can I insert the ":" immediately to the left of the second digit from the right? mytimes<-scan(what="") 1457 1457 1310 1158 137 1855 Thanks! Dan
2006 Jan 19
1
chron library: format.times, parse.format and h:m (PR#8507)
Due to the following lines in parse.format: else if (nf == 3) { sep <- "" fmt <- substring(format, first = 1:3, last = 1:3) } If a format code has 3 characters, it will not use a separator: > library(chron) > mytime = times('7:15:00') > format(mytime,'h:m') [1] "0715" - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu --please do not edit the information...
2020 Mar 11
1
Fwd: Windows upssched does not work
...-on-line > > AT ONLINE * CANCEL-TIMER onbattwarn > > > > --- notify.cmd > > @ECHO OFF > > For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%b.%%a.%%c) > > For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b) > > echo [%mydate%-%mytime%] %1 %2 %3 %4 >> C:\\NUT\\notify.log > > I don't recognise this language, but the notifications should probably be called > from your script sched.cmd if you call the upssched binary. this is windows command line (shell) language > &...
2009 Sep 04
0
Mongrel Timeout for System Calls
...g around a bit, I discovered this writeup about timeout and system calls (http://adamblog.heroku.com/past/2008/6/17/battling_wedged_mongrels_with_a/). I immediately installed SystemTimer (http://ph7spot.com/articles/system_timer) and tried again: begin require ''system_timer'' MyTimer = SystemTimer rescue LoadError require ''timeout'' MyTimer = Timeout end def invoke(rfc) MyTimer.timeout_after(20.seconds) do rfc.invoke end rescue Timeout::Error raise Timeout::Error, "RFC Call timed out after 20 seconds" end This time, it...
2008 Nov 06
3
How to manipulate the time data without the date?
Hi,all I only got the time data such as: tms<-c("19:30:23","18:39:10".....) I want to manipulate this time series data. For example, plus one second(or minute) or minus one second This data only has the time(h:m:s), without the date. I know that there are chron package, ISOPix class and the timeDate class, but all these class need the input of date. How can we
2006 Aug 08
0
gamm question
...lines of: tmp<-gamm(Y ~ s(Year,by=station1)+s(Year,by=station2)+ s(Year,by=station3)+s(Year,by=station4)+ s(Year,by=station5)+ factor(station)*factor(month), correlation=corAR1(form=~MyTime|station), famliy=gaussian) station is just a long vector with ones, twos, threes, fours and fives. MyTime defines the order of time (and has values 1 to 240) This model fits a Year smoother on each station and, and has one auto-regressive parameter (whihc...
2006 Sep 14
1
working with strptime data
...etc...[to the Nth datapoint]) TheTime <- c("9/1/2006 8:00", "9/1/2006 8:13", etc...[to the Nth timestamp]) I convert the timestamp strings into POSIXct types as: TheTime <- as.POSIXct(strptime(TheTime, format="%m/%d/%Y %H:%M")) And create a plot as such: plot(MyTime,MyData) ---------------------------------------------------------- And here is a specific question: How do I calculate the number of months than are spanned between two POSIXct values? (i.e. NumOfMonths <- MonthFunction(range(MyTimeStampData)) Thanks-in-advance, - rich
2011 Sep 23
1
p values in coxph()
...ite understand what model the ratio is being tested against. If the current model has two variables (x1 and x2), and those are the extra degrees of freedom, then the baseline should then have 0 variables, but that's not really a Cox model? thanks for any help. Brian > summary(coxph(Surv(myTime,Event)~x1+x2)) Call: coxph(formula = Surv(myTime, Event) ~ x1 + x2) n= 211 coef exp(coef) se(coef) z Pr(>|z|) x1 0.03594 1.03660 0.17738 0.203 0.83942 x2 0.53829 1.71308 0.17775 3.028 0.00246 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 exp(coe...
2012 Jul 19
2
[PATCH] pygrub: add syslog support to pygrub
...,7 @@ class Grub: while not self.isdone: self.run_main(timeout) timeout = -1 - + return self.selected_image def run_main(self, timeout = -1): @@ -495,7 +497,7 @@ class Grub: self.start_image = 0 while (timeout == -1 or mytime < int(timeout)): draw() - if timeout != -1 and mytime != -1: + if timeout != -1 and mytime != -1: self.screen.addstr(20, 5, "Will boot selected entry in %2d seconds" %(int(timeout) - mytime))...
2008 Jul 02
1
Problem with strucchange package
Dear R Users, I am attempting to use the strucchange package but get an error which is difficult to decipher. I get the following error with breakpoints: > bp<-breakpoints(regr[,1]~regr[,2]+regr[,3]) Error in my.RSS.table[as.character(i), 3:4] <- c(pot.index[opt], break.RSS[opt]) : nothing to replace with I was wondering if anyone has seen this issue before and off the top of