Displaying 20 results from an estimated 10000 matches similar to: "convert numbers into dates and time"
2012 May 02
2
date and time conversion
Hi
I've been trying to convert numbers from an online temperature database
into dates and time that R recognizes. the problem is that the database has put a T
between the numbers and R will not accept any conversions.
this is the format that it's in now
1981-01-02T08:00
can anyone help?
cheers!
--
View this message in context:
2012 May 02
3
factor conversion to date/time
Hi, I've been trying to convert numbers from an online temperature database
into dates and time that R recognizes. I've tried as.Date, as.POSIXlt and strptime the problem is that the database has put a T between the numbers and R will not accept any conversions. currently it sees the date as a factor with the format as 1981-01-02T08:00I would like to keep only the year and month, but my
2006 Jun 04
2
surprising dates
I wonder if this is an intentional feature or an oversight. in some
column summaries or in ifelse operations, apparently I am losing the
date property of my vector.
> a <- c(198012, 198101, 198102)
> b <- a*100+31
> c <- as.Date( as.character(b), "%Y%m%d" )
> summary(c)
Min. 1st Qu. Median Mean 3rd Qu. Max.
2008 Jun 08
20
how to parse a "dd/mm/yyyy" formatted date string???
Hi,
I''m stuck. How do you parse a "dd/mm/yyyy" formatted date string???
I get a date format error.
Thanks in advance
Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2007 Dec 14
3
How to convert Datetime numbers from Excel to POSIXt objects
Hi all,
I need to compare time series data files of different time formats. I
had no problems with text format using strptime.
But how can I convert datetime numbers from Excel (days since 30.12.1899
00:00:00) into POSIXt objects?
For example 29770.375 should be converted to "03.07.1981 09:00:00"
I tried the following code and encountered strange results:
t1-t0 gives 29770.33
2010 Feb 01
3
Convert a column of numbers to a column of strings
Hello,
Please excuse me if this question has been asked before. I'm new to R, and
have been trying to google the answers without any success.
I would like to convert a set of date and time into R date-time class. Right
now, the dates and times are in integer format, so I first need to convert
them into string, and then to R date-time using strptime. However, I have a
problem converting them
2008 Jul 09
4
Strptime/ date time classes
Dear all,
I've come across a problem using strptime, can anyone explain what's
going on? I'm using version 2.7.0 on Windows XP.
Thank you
Caroline
First read in a data file using read.table
alldata = read.table(file, header=F, skip=4, colClasses =
c("character","numeric"))
dim(alldata)
[1] 223960 2
# inefficient, safe way of sorting out missing or dodgy
2006 Nov 08
2
Convert ordinary dates into POSIX
Does anyone know where I can find any tool for Windows that converts
dates from ordinary formats into POSIX?
I need it to import sime time series from Excel into R and use them
with its package.
Thanks!
2010 Oct 13
1
Date Time Objects
I am trying to convert an array from numeric values back to date and time
format. The code I have used is as follows;
for (i in 0:(length(DateTime3)-1)) {
DateTime3[i] <- (strptime(start, "%m/%d/%Y %H:%M")+ i*interval)
where start <- [1] "1/1/1981 00:00"
However the created array (DateTime3) contains [1,] 347156400 347157600
347158800 347160000 347161200 347162400
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")
2011 Aug 17
3
Convert week value to date
Hello all,
I'm hoping to convert a decimal value for week of the year back to a date object.
Eg:
strptime(paste(2010,1:52,sep=" "),format="%Y %W")
I expected (hoped?) this would give me the date for Monday of each week. Instead, it's giving me 52 values of today's date.
Where am I erring?
Thanks
Michael
_______________________________________________________
2015 Jul 01
5
additional leap second
hi,
Index: leap_second/src/library/base/R/zdatetime.R
===================================================================
--- leap_second/src/library/base/R/zdatetime.R (revision 68608)
+++ leap_second/src/library/base/R/zdatetime.R (working copy)
@@ -24,7 +24,8 @@
"1979-12-31", "1981-6-30", "1982-6-30", "1983-6-30",
2008 Oct 07
1
column-wise z-scores by group
Hi,
I have a dataset of historical monthly temperature data that is grouped by
weather station. I want to create z-scores of the monthly data using a base
period of a subset of years. I subset the dataset first to include only data
from the years (V2) that make up the base period so I could calculate the
appropriate means and standard deviations
V1 V2 V3 V12 V15 V16 V19
84
2009 Jun 08
4
increase number of ticks on x axis of dates
My x axis is a series of daily dates (e.g., 01/01/2000, 01/02/2000,
etc.) from 2000 to end of 2008. The default only gives me 4 ticks. I
want more. Why doesn't this work?
sdate<-as.POSIXct(strptime(date,format="%m/%d/%Y"))
plot(ppt~sdate,type="l",ylim=c(0,47),col=1,lwd=1,pch=16,ylab="Salinity,
psu",xlab="Year",las=1,main="Duck Key
2005 Jan 26
1
Converting yr mo da to dates
I'm using R 2.0.1 in windows XP (and am not currently subscribed to this
mailing list).
I have a USGS dataset, a text file with fixed width fields, that includes
dates as 6-digit integers in the form yrmoda. I could either read them that
way, or with yr, mo, and da as separate integers. In either case, I'd like
to convert them to a form will allow plotting other "y"
2009 Apr 29
1
Data type question: converting dates
I have a text (csv) file) with two columns: dates and numeric measurements.
I read it using read.table and the dates get read as a factor, with as many
levels as there are dates in the data. How can I create a matrix-like data
structure (data frame?) which has one column of “real” dates (a vector of
dates, not a factor variable) and one column of the numeric measurements?
The strptime function
2011 May 12
3
problem converting character to dates
Hi all,
I've searched this problem and still I can't understand my results, so here
goes:
I have some time series I've imported from excel with the dates in text
format from excel. Data was imported with RODBC, sqlQuery() function.
I have these dates:
>adates
[1] "01/2008" "02/2008" "03/2008" "04/2008" "05/2008"
2009 Jan 11
2
Convert date/time string to date
I am new to R and am trying to import a text file that contains
date/time and various fields. I want to sort this matrix by date and
also perform calculations on the date field (difference between two
dates etc).
The format of the string looks as follows:
x<-c("25/2/2003 0:00:00")
I tried:
as.Date(x,format='%d/%m/%y')
[1] "2020-02-25"
Obviously I am doing
2006 Apr 17
2
Problem using plot and converted dates
Dear R-help,
I am having problems with plotting converted dates in chronological as Mar-03,
May-03...Jul-04.
My script is:
sam4<-c("03/03/01","03/05/01","03/07/01","03/09/01","03/11/01","04/01/01","04/03/01","04/05/01","04/07/01")
sam5<-strptime(sam4,format="%y/%m/%d")
2001 Mar 21
1
convert date/time to numeric
Hi,
I convert a numeric value to date/time format and do
some operations on it. How to convert it back to a
numeric value?
Thanks,
Yu-Ling Wu
==================================================
begin <- 200103131030
EndTime <- strptime(paste(begin), format="%Y%m%d%H%M")
+ 60
end <- ????
(I want end=200103131031 instead of "2001-03-13
10:31:00")