similar to: How to convert SPSS date data to dates?

Displaying 20 results from an estimated 1000 matches similar to: "How to convert SPSS date data to dates?"

2009 Mar 10
1
?as.POSIXct (PR#13587)
Full_Name: Luca Braglia Version: 2.8 OS: Windows Submission from: (NULL) (85.18.136.110) >From ?as.POSIXct ## SPSS dates (R-help 2006-02-17) z <- c(10485849600, 10477641600, 10561104000, 10562745600) as.Date(as.POSIXct(z, origin="1582-10-14", tz="GMT")) ^^ It should be 15 (Gregorian calendar adoption day, when
2009 Mar 11
1
Is this a documentation bug? Spss dates import
Hello R-user bug seekers are needed! In order to perform these simple tasks you have to use a copy of SPSS and obviously R. The problem is that date conversion of data coming from SPSS gives wrong results, if we follow ?as.POSIXct ## SPSS dates (R-help 2006-02-17) z <- c(10485849600, 10477641600, 10561104000, 10562745600) as.Date(as.POSIXct(z, origin="1582-10-14",
2004 Mar 03
2
read.spss and time/date information
I don't use SPSS but following through on your detective work can provide the likely answer. First note that both date numbers are evenly divisible by the number of seconds in a day, i.e. 24*60*60. This suggests that these numbers are seconds since some origin. Since we know "2003/02/11" corresponds to 13264300800 we deduce that the origin must be spss.orig <-
2003 Apr 21
3
Dates in read.spss
I am using read.spss in the foreign package to read an SPSS save file. For date variables I get huge values such as 11489990400. Does anyone know how to convert these values to R POSIXct date objects? Thanks in advance -Frank platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor
2016 Mar 11
2
Regression in strptime
This is definitely obscure but we had a unit test that called .Internal(strptime, "1942/01/01", %Y/%m/%d") with timezone (TZ) set to CET. In R-3.1.3 that returned "1942-01-01 CEST" which, paradoxically, is correct as they evidently did strange things in Germany during the war period. Java also returns the same. However, R-3.2.4 returns "1942-01-01 CET".
2012 Jun 06
2
package zoo, function na.spline with option maxgap -> Error: attempt to apply non-function?
Hello, I'm trying to use na.spline (package zoo) to fill some missing data in a time series. this works fine, however, if I apply the 'maxgap' argument, I always get the error: <------ Error in na.spline.vec(x., coredata(object.), xout = xout., ...) : attempt to apply non-function ------> I couldn't find a similar error for this case in the mailing lists and zoo vignette,
2013 Sep 06
1
rsync 3.0.9 hangs when syncing from NFSv3 share - possible to retry after timeout?
Hello, I'm using rsync 3.0.9 to backup several NFS shares from a fileserver, mounted over NFSv3, to a local RAID on a backup server. Both servers are running Ubuntu 12.04 server LTS. The fileserver's filesystem is ext4. The NFS shares are mounted on the backup server as follows: fileserver:/mnt/storage/share1 /mnt/share1 type nfs (ro,tcp,bg,soft,intr,addr=192.168.1.1)
2016 Mar 12
2
Regression in strptime
On 3/12/16 12:33 AM, peter dalgaard wrote: >> On 12 Mar 2016, at 00:05 , Mick Jordan <mick.jordan at oracle.com> wrote: >> >> This is definitely obscure but we had a unit test that called .Internal(strptime, "1942/01/01", %Y/%m/%d") with timezone (TZ) set to CET. > Umm, that doesn't even parse. And fixing the typo, it doesn't run: > >>
2008 Nov 04
1
perform Kruskal-Wallis test without using the built-in command in R
Hi, again i am stuck in my presentation, and i have never learn R before in my life but need this to be done, so please help me out for a favour: http://www.nabble.com/file/p20333155/kew.dat kew.dat run this in R and these comes up: Month Year Rain 1 Jan 1900 74.400000 2 Feb 1900 80.500000 3 Mar 1900 23.600000 4 Apr 1900 23.600000 5 May 1900 25.100000 6
2003 Nov 19
5
ISOdate returns incorrect date?
Dear all, I have found the following (for me) incomprehensible behaviour of ISOdate (POSIXct): > ISOdate(1900,6,16) [1] "1900-06-15 14:00:00 Westeurop?ische Sommerzeit" > ISOdate(1950,6,16) [1] "1950-06-16 14:00:00 Westeurop?ische Sommerzeit" Note that in the first case I get the 15th of June back, not the 16th as I would have expected! This happened under R-1.7.1 on
2003 Nov 14
5
ISOdate() and strptime()
Dear R-people! I am using R 1.8.0, under Windows XP. While using ISOdate() and strptime(), I noticed the following behaviour when "wrong" arguments (e.g., months>12) are given to these functions: > ISOdate(year=2003,month=2,day=20) #ok [1] "2003-02-20 13:00:00 Westeurop?ische Normalzeit" > ISOdate(year=2003,month=2,day=30) #wrong day, but returns a value [1]
2007 Mar 22
2
difftime / RBloomberg
hi, I've troubles with some difftime objects. e.g. ISOdate(2001, 4, 26) - ISOdate(2001, 2, 26) - 2 works, telling me "Time difference of 57 days". But when I'd like to add days, such as ISOdate(2001, 4, 26) - ISOdate(2001, 2, 26) + 2 the function gives me an error. Function "as.COMDate.chron" of the Rbloomberg package doesn't work for that reason. I'm
2013 Mar 12
5
extract values
Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]>1820,]->x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425, 1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074, 1.618, 1.677, 1.845, 1.594, 1.6655, 1.1605, 1.425, 1.099, 1.007, 1.1795, 1.3855, 1.4065, 1.138, 1.514,
2007 May 10
3
Getting the last day of the month.
Hi, Given a date, how do I get the last date of that month? I have data in the form YYYYMM, that I've read as a date using > x$Date <- as.Date(ISOdate(substr(x$YearEnd,1,4),substr(x$YearEnd,5,6),1)) But this gives the first day of the month. To get the last day of the month, I tried > as.Date(as.yearmon(x$Date,frac=0)) But I don't get the last day of the month here. (Tried
2002 May 21
1
I() fails on objects of class POSIXct (PR#1587)
Although the documentation is somewhat sketchy, I() can be used to create objects of class AsIs: > I("a") [1] "a" attr(,"class") [1] "AsIs" "character" > I(4) [1] 4 attr(,"class") [1] "AsIs" "numeric" > I(4 + 0i) [1] 4+0i attr(,"class") [1] "AsIs" "complex" > This
2006 Apr 10
3
timeAlign
I use POSIXct for datetimes. Is thee a timeAlign function that I can use where : align by year direction -1 ==> start of this year direction 1 ==> start of next year align by week direction -1 ==> date on last sunday direction 1 ==> date on next sunday align by day direction -1 ==> time at past midnight direction 1 ==> time at this comming
2018 Jan 22
2
Manipulating two large dataset differing by date and time
Dear Members, Compliments of the Season!! Below is a part of a code I use for Fourier analysis of signals. The code handles data with the format 05 01 01 8628 (year, month, day and count) 05 01 02 8589 (year, month, day and count) The sample data is attached as 2005daily.txt. I would like to adapt the code to handle data of the form: 05 01 01 00 4009
2002 May 28
2
histogramming dates
I'd like to make a plot showing frequency of an event. The data is in a data from that includes Year, Month and Day (of month) fields, so I created a Date with ISOdate(Year, Month, Day, tz=''). I can plot frequencies for the year 2002 with > thisyear <- Date[Year==2002] > hist( thisyear, xaxt='n' ) > axis.POSIXct( 1, at=seq(min(thisyear), max(thisyear),
2003 Sep 12
2
Sorting a vector by date
Hello out there.... Again I have a problem and I stuck... How can I sort a vector of dates? For example I have the vector a<-ISOdate(2001, 1, 1) + 70*86400*runif(10) How can this vector be sorted chronological? And what's the function I should work with to handle these entries? (in sense of: which(a>2001-01-04) or somehting like that) Thank you for helping M.Kirschbaum
2004 Nov 03
3
cut POSIX results in NA - bug?
Dear all I try to make hourly average by cut() function, which almost works as *I* expected. What puzled me is that if there is only one item at the end of your data it results in NA. Example will explain what I mean datum<-seq(ISOdate(2004,8,31), ISOdate(2004,9,1), "min") cut(datum[1370:1381],"hour", labels=F) [1] 1 1 1 1 1 1 1 1 1 1 1 NA