similar to: Applying strptime() to a data set or array

Displaying 20 results from an estimated 4000 matches similar to: "Applying strptime() to a data set or array"

2013 Oct 03
3
write problem from mac osx 10.8.5 clients to samba 4
Hi? I have setup a samba 4 DC with mixed client environment. My problem is that the mac osx client are unable to write to a samba 4 share. I tested mac osx clients on a normal windows 7 share and it works fine I tested mac osx clients on a samba 3.5 .. share and everything works fine. As i am in a professional environment and all the windows clients are already binded to the samba 4 domain i
2008 May 30
3
Strptime
Hi This code should explain what I'm trying to do > strptime("30-Jan-08", "%d-%b-%y") [1] "2008-01-30" > > format(strptime("30-Jan-08", "%d-%b-%y") , "%b-%y") [1] "Jan-08" > > strptime(format(strptime("30-Jan-08", "%d-%b-%y") , "%b-%y") , "%b-%y") [1] NA I have a
2007 Jan 08
1
Does strptime(...,tz="GMT") do anything?
Hi All In trying to correlate some tide gauge data I need to deal with varying timezones. From the documentation on strptime, it seemed that the tz variable might have some effect on the conversion, but I'm not seeing an effect. > strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="PST")+0 [1] "2006-12-01 01:02:00 EST" >
2017 Jan 11
4
bug with strptime, %OS, and "."
Hi R Devel, I just ran into a corner case with 'strptime'. Recall that the "%OS" conversion accepts fractional seconds: > strptime("17_35_14.01234.mp3","%H_%M_%OS.mp3")$sec [1] 14.01234 Unfortunately for my application it seems to be "greedy", in that it tries to parse a decimal point which might belong to the rest of the format: >
2011 Jul 06
1
trouble parsing a date using strptime()
Hi, I am having a trouble parsing dates using strptime() that I get in the format of year and week number. The data looks like this "201127" which means year 2011 and week 27. I would like to graph this using ggplot but then I get a gap between 201054 and 201101 so I thought I would just easily convert it. I tried to use strptime and as.Date and the format string of %Y%W but it seems
2017 Jan 11
2
bug with strptime, %OS, and "."
On Tue, Jan 10, 2017 at 08:13:21PM -0600, Dirk Eddelbuettel wrote: > > On 10 January 2017 at 17:48, frederik at ofb.net wrote: > | Hi R Devel, > | > | I just ran into a corner case with 'strptime'. Recall that the "%OS" > | conversion accepts fractional seconds: > | > | > strptime("17_35_14.01234.mp3","%H_%M_%OS.mp3")$sec > |
2011 Feb 08
3
strptime "March 14 2010" and NA?
Converting date strings that range between Mar-14-2010 2:00 and Mar-14-2010 2:59 (inclusive) to date objects (POSIX) returns a NA entity: > strptime("3/14/2010 2:00",format="%m/%d/%Y %H:%M") [1] "2010-03-14 02:00:00" This looks fine, however other functions such as plot see a NA object instead: > is.na(strptime("3/14/2010
2006 Apr 15
1
strptime failure R 2.2.1 (PR#8773)
Full_Name: Bill Hutchison Version: 2.2.1 OS: Windows XP Submission from: (NULL) (69.158.121.13) example(strptime) produces the following error: Error in strptime(x, "%d%b%Y") : 2 arguments passed to 'strptime' which requires 3 This error occurs wherever strptime is used. It does not occur in 2.2.0
2011 Jun 17
1
issue with strptime
Hi everyone, I have bunch of date and time observations in the format %Y-%m-%d %I %M %S %p. I used strptime() to read this format. But the problem is some of the times are in the format of %I %M %p, so for those times, strptime is giving me NA values. For example, strptime(paste("2009-04-08","1:49:47 PM"),format="%Y-%m-%d %I:%M:%S %p") [1] "2009-04-08
2004 Nov 30
4
Unable to understand strptime() behaviour
R V2.0.1 on Windows XP. I have read the help pages on strptime() over and over, but can't understand why strptime() is producing the following results. > v <- format("2002-11-31", format="%Y-%m-%d") > v [1] "2002-11-31" > factor(v, levels=v) [1] 2002-11-31 Levels: 2002-11-31 > x <- strptime("2002-11-31",
2003 Nov 26
4
strptime Usage
Hi, I have a column in a dataframe in the form of: > as.vector(SLDATX[1:20]) [1] "1/6/1986" "1/17/1986" "2/2/1986" "2/4/1986" "2/4/1986" [6] "2/21/1986" "3/6/1986" "3/25/1986" "4/6/1986" "4/10/1986" [11] "4/23/1986" "4/30/1986" "5/8/1986"
2007 Jun 12
1
Can strptime handle milliseconds or AM/PM?
I'm trying to proess date/time fields from files that were given to me to analyze. Any clues what I'm doing wrong with strptime? This seems to fail the same way under Linux or Windows. For ?strptime would it make sense to explain %OS3 somewhere besides the Examples? > # Why does %OS3 work here? > format(Sys.time(), "%H:%M:%S") [1] "16:45:19" >
2003 May 29
3
Odd behavior of strptime
The example from the help page for strptime has the following oddity: > dates <- c("02/27/92", "02/27/92", "01/14/92", + "02/28/92", "02/01/92") > times <- c("23:03:20", "22:29:56", "01:03:30", + "18:21:03", "16:56:26") > x <-
2001 Jan 11
2
problem with strptime example (PR#811)
On Thu, 11 Jan 2001 stephen@anc.ed.ac.uk wrote: > Hi, > > The help file for strptime has the following code which doesn't work > for me: > > ## read in date info in format `ddmmmyyyy' > x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960") > z <- strptime(x, "%d%b%Y") > > z > [1]
2001 Oct 01
2
problem with strptime example (PR#811)
Hello, strptime is still not working correctly in my computer (Windows 98 and R Version 1.3.1) From x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960") strptime(x, "%d%b%Y") I obtain [1] "NA" "NA" "NA" "NA" while x <- c("01011960", "02011960", "3131960",
2009 Jul 16
2
Problem using strptime
Hello I am trying to read a date and time from a file and convert them to POSIXct using strptime() the dates are stored in t which is a factor This the code I am using to illustarte > t[1] [1] 07/14/2009 13:41:00 10 Levels: 07/14/2009 13:41:00 07/14/2009 13:42:00 ... 07/15/2009 07:12:00 > a=t[1] > a [1] 07/14/2009 13:41:00 10 Levels: 07/14/2009 13:41:00 07/14/2009 13:42:00 ...
2011 Feb 15
2
strptime format = "%H:%M:%OS6"
I read a dataset with times in them, e.g., "09:31:29.18761". I then parse them: > all$X.Time <- strptime(all$X.Time, format = "%H:%M:%OS6"); and get a vector of NAs (how do I check that except for a visual inspection?) then I do > options("digits.secs"=6); > all$X.Time <- strptime(all$X.Time, format = "%H:%M:%OS"); and it, apparently, works:
2017 Jan 17
1
strptime("1","%m") returns NA
Hi Frederik, On Mon, 2017-01-16 at 18:20 -0800, frederik at ofb.net wrote: > Hi R Devel, > > I wrote some code which depends on 'strptime' being able to parse an > incomplete date, like this: > > > > > base::strptime("2016","%Y") > [1] "2016-01-14 PST" > > The above works - although it's odd that it gives the month
2003 Nov 12
1
value of strptime in R 1.8.0
Dear R-people! I am using R 1.8.0, under Windows XP. What I want to do is a date conversion of a character column of a data frame and assign the result as a new column. Simple example: > x <- data.frame(a=c("yesterday","today","tomorrow"), b=I(c("20031111", "20031112", "20031113"))) # convert x$b from character to date: >
2004 Sep 03
2
strptime problems
Hi, I'm experiencing a problem with strptime. (R 1.9.1 on a Win2000 machine) I have a large list containing 6 columns and 161800 rows. One column contains dates that I want to convert in order to compare the different dates. Some dates work just fine while others become NA. I don't see any difference between the dates. I've attached an example from my code. Hope this explains my