similar to: Week of the Year date conversion

Displaying 20 results from an estimated 6000 matches similar to: "Week of the Year date conversion"

2009 Jan 27
2
Can I create a timeDate object using only year and week of the year values?
For a model I am working on, I have samples organized by year and week of the year. For this model, the data (year and week) comes from the basic sample data, but I require a value representing the amount of time since the sample was taken (actually, for the purpose of the model, it is sufficient to use the number of weeks from the middle of the sample week to the present). What I have found so
2005 Jul 28
1
conversion from SAS
Hi, I wonder if anybody could help me in converting this easy SAS program into R. (I'm still trying to do that!) PROC IMPORT OUT= WORK.CHLA_italian DATAFILE= "C:\Documents and Settings\carleal\My Documents\REBECCA\stat\sas\All&nutrients.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; data chla_italian; set chla_italian;
2011 Aug 16
1
Dates - week and year not day.
Hi, I would be very grateful for some advice. I have read the help pages for Date, strptime, etc. All examples seem to use some version of day month year as date format. However I have Weekly composite data so ONLY want to input the dates as Week.Year (eg 35.2011). strptime seems to show this is possible using %W for week (UK convention) and %Y for year. My data is in a df called chlorophyll and
2009 Sep 14
1
How to extract partial predictions, package mgcv
Dear package mgcv users, I am using package mgcv to describe presence of a migratory bird species as a function of several variables, including year, day number (i.e. day-of-the-year), duration of survey, latitude and longitude. Thus, the "global model" is: global_model<-gam(present ~ as.factor(year) + s(dayno, k=5) + s(duration, k=5) + s(x, k=5) + s(y, k=5), family =
2004 May 07
0
loess and as.POSIXct
Hi there fellow R-users, I have just upgraded to R version 1.9.0 from R version 1.7.1 for Windows. Im trying to use the loess smoother where the X-variable is an as.POSIXct variable. The following works fine with R1.7.1 but not with R1.9.0. Here is the example: dates<-c('2003-08-03','2003-08-10','2003-08-17','2003-08-24','2003-08-31','2
2013 Aug 16
1
as.Date.character speed improvement suggestion
R-Devel, I store and retrieve a large amount of financial data (millions of rows) in a PostgreSQL database keyed by date (and represented in R by class Date). Unfortunately, I frequently find that a great deal of processing time is spent converting dates from character representations to Date class representations in R, presumably because strptime is not fast for large vectors (>10,000
2011 Aug 29
1
how to referee a dimension name via a variable?
hi, R-users I have a data.frame for example test$newdataday24 and test$newdataday48 I can plot them by plot(test$newdataday24) but now i want to plot different data by define a variable to describe them dayno<-c(24,48) newnam<-paste("test$newdataday",dayno,sep="") plot(newnam[1]) but i failed,the error message said that something wrong with plot.window what can i do
2009 Sep 22
3
how to convert character string with only month and year into date
Dear R helpers. I am new to plotting time data using R. wonder how to convert character time info into date in R. I searched over the web but did not find answer. the input character string is something like 03_1993 or 03-1993, so the precision is at month level. I tried the following but failed. #R code below. strptime(c("03_1993"),"%m_%Y")
2004 Jan 30
7
Calls dropping off
Hi, I've got a fairly working Asterisk setup, with a few minor glitches, one of which is very very irritating. Sometimes, during a call, the remote end just drops off. We're using software SIP phones (SJPhone) connecting to * then out through analogue lines with X100P cards. There is nothing in the logs and nothing on the console, the call just seems to 'go away'! Can anyone
2013 Mar 19
1
Convert to date and time of the year
Dear R Users, I have data for more than 3 years. For each year I want to find the day corresponding to Jaunary 1 of that year. For example: > x <- c('5/5/2007','12/31/2007','1/2/2008') > #Convert to day of year (julian date) - > strptime(x,"%m/%d/%Y")$yday+1 [1] 125 365 2 I want to know how to do the same thing but with time added. But I still
2009 Nov 13
2
AR(2) modelling
Hi useRs, I'm trying to fit a basic AR(2) model with the 'ar' function. And when I try to check the value of the coefficients, I could not find the same value as the 'ar' function. Here is my example: myserie <- c(212, 205, 210, 213, 217, 222, 216, 218, 220, 212, 215, 236) #plot(myserie, type="l") myserieminus0 <- tail(myserie, -2) myserieminus1 <-
2009 Nov 13
2
AR(2) modelling
Hi useRs, I'm trying to fit a basic AR(2) model with the 'ar' function. And when I try to check the value of the coefficients, I could not find the same value as the 'ar' function. Here is my example: myserie <- c(212, 205, 210, 213, 217, 222, 216, 218, 220, 212, 215, 236) #plot(myserie, type="l") myserieminus0 <- tail(myserie, -2) myserieminus1 <-
2012 Mar 27
1
Convert day of year back into a date format.
Hello, I am having trouble figuring out how to convert a Day of Year integer back into a Date format. For example I have the following: date <- c('2008-01-01','2008-01-02','2008-01-03','2008-01-04','2008-01-05','2008-01-06','2008-01-07',
2004 Jan 19
2
Different Caller ID for each Zap Interface
Hi there, I'm wondering if there is a way to assign a different Caller ID to each Zap interface. I have 3 Digium X100P cards, and I'm sure there must be some way of configuring zapata.conf to allow each line to identify itself with a different Caller ID string. Many thanks, Steve -- Steve Foy | http://www.unite.net UNITE Solutions | Tel: 028 9077 7338
2013 Mar 01
7
Conditional Weighted Average (ddply or any other function)
Hello R community, I am computing weighted average statistic by using ddply function: My data set is: N1 T1 S1 I1 C1 FY-4 ROE11 EPS11 MKT11 N1 T1 S1 I1 C1 FY-3 ROE12 EPS12 MKT12 N1 T1 S1 I1 C1 FY-2 ROE13 EPS13 MKT13 N1 T1 S1 I1 C1 FY-1 ROE14 EPS14 MKT14 N1 T1 S1 I1 C1 FY0 ROE15 EPS15 MKT15 N1 T1 S1 I1 C1 FY1 ROE16 EPS16 MKT16 N1 T1 S1 I1 C1 FY2 ROE17
2004 Jan 21
3
Making a call with sample.call
Hi there, I'm having some trouble with getting Asterisk to make a call, I think it should be quite easy, but anyway... Using the following file contents: ## Channel: Zap/3/<TEL NUMBER HERE> MaxRetries: 2 RetryTime: 60 WaitTime: 30 Context: phones Extension: 502 Priority: 1 ## Extension 502 is simply one that plays a sound back. When I dump this file into
2004 Feb 03
4
SIP debug logs
This strikes me as something that should be really very simple to do, but I can't figure it out. Is there a way of logging all SIP debuging info to a file somewhere? It would help me greatly! Cheers, Steve -- Steve Foy | http://www.unite.net UNITE Solutions | Tel: 028 9077 7338
2007 Oct 09
2
extract year or month from date
Hi, I am having trouble extracting just the year or the month or the day from a date such as 5/7/2007 which is May 7th 2007. Is there any particular function to extract just the year from this format? When I am reading this data from a text file it is reading it correctly in the same format but does not acknowlede it as date but as a factor. If I try as.date(5/7/2007) then it is converting it to
2017 Sep 11
4
Case statement in sqldf
Hi all, I am trying to create a new variable called Fiscal Year (FY) using case expression in sqldf and I am getting a null FY , see the code below . Please advise me as to how I can do this mutation. library(zoo) library(lubridate) library(stringr) library(RH2) library(sqldf) cr$ReportDate = as.Date(cr$ReportDate, format ='%Y-%m-%d') > cr2 = sqldf(" select
2004 Mar 24
0
Job Vacancy
www.kssg.com a pricing consulatancy based in Manchester (UK) are seeking an experienced statistical analyst. Candidates must be eligible to work in the EU. If you are interested please send an updated CV to jonesw@kssg.com . Company Overview KSS is a leading provider of pricing and revenue management systems for the Retail and Petroleum sectors. Our business applications help our clients get