similar to: as.Date() behaviour when incomplete input string

Displaying 20 results from an estimated 10000 matches similar to: "as.Date() behaviour when incomplete input string"

2008 Apr 11
1
Error in fromchar(as.character(x)) : character string is not in a standard unambiguous format
Hello, I was hoping for advice regarding resolving the above error. I have a csv file that contains the following variable: $ Order.Made.Date : Factor w/ 299 levels "1-Apr-08","1-Aug-05",..: 278 285 91 286 159 132 108 261 282 147 ... I want to calculate a variable named F.length, which is today's date minus the values contained in the variable:
2009 Jan 21
3
Error as.Date on Invalid Dates
Hi All, I have an script in R which accepts user inputs for certain parameters, particularly dates, which the user inputs as character strings. eg: > date1 <- "2009-01-21" The script later parses the input via the as.Date function: > as.Date(date1) However, as.Date encounters an error when the string does not represent an actual date. eg: > date1 <-
2002 Feb 28
1
Bug in julian() (PR#1332)
Full_Name: Michael Jacob Version: 1.4.1 OS: Windows 2000 SP2 Submission from: (NULL) (195.27.237.226) Hi, there seems to be a bug in julian(): > Sys.getlocale() [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=English_United States.1252" > julian(Sys.time()) Error in fromchar(x) : character string is not in a
2001 Oct 04
1
get.hist.quote does not work (PR#1116)
Full_Name: Arto Luoma Version: 1.3.1 OS: Windows 98 Submission from: (NULL) (153.1.53.119) Hi! The function get.hist.quote in the package tseries (Version 0.7-6) does not work in my computer. I found that it uses the function strptime which did not "understand" English month names in my Finnish locale (see bug report 811). I changed the regional settings to be English (UK) and
2004 Oct 11
5
read "4-jan-02" as date
Dear R users, I have a column with dates (character) in a data frame: 12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01 and I need to convert them to (Julian) dates so that I can sort the whole data frame by date. I thought it would be very simple, but after checking the documentation and the list I still don't have something that works. 1. as.Date returns the error below. What am I
2004 Jun 02
2
Bug with date 1970-01-01 on Windows (PR#6929)
Full_Name: Martin Lenze Version: 1.8.0 alpha (2003-09-18) OS: Microsoft Windows 2000 [Version 5.00.2195], SP4 Submission from: (NULL) (82.82.76.131) Seems to be related to PR#1332... Hello, I get: > Sys.getlocale() [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=English_United States.1252" >
2008 Jul 25
0
Errror in running R2.7.1 version to R2.6.2 version
Dear all, I get an error shown below when i run the command "use" found in package epicalc on R2.7.1 and R2.7.0 but dont get the error when i run it on R 2.6.2 What is likely to be the problem? library(epicalc) Loading required package: foreign Loading required package: survival Loading required package: splines use("malvac.dta") Error in fromchar(x) : character string
2009 Jan 22
2
Unexpected behaviour of the as.Date (was: Error as.Date on Invalid Dates)
Dear Brian, I dont understand what you mean. The thread was about the as.Date which you suggested to be used instead of the as.date. Following your advice I tried the as.Date and have questions about the observed behaviour, which was surprising to me. Is this what you call hijacking? Do you mean I ought start a new thread instead? I thought my question were relevant to the threads'
2007 Sep 14
2
Date vs date
I wrote the date package long ago, and it has been useful. In my current task of reunifying the R (Tom Lumley) and Splus (me) code trees for survival, I'm removing the explicit dependence on 'date' objects from the expected survival routines so that they better integrate. Comparison of 'date' to 'Date' has raised a couple of questions. Clearly Date is more
2007 Feb 16
0
Request: make as.POSIXlt generic
In the base package, as.POSIXct() is an S3 generic function, but as.POSIXlt() is not. As shown below, the current implementation is already crying out to be refactored into a generic function with methods for various classes. It calls "inherits" five times. Not only is this bad style, it also disallows me or anyone else from making as.POSIXlt() work with other kinds of time-ish
2007 Sep 17
2
Date vs date (long)
Peter et al Thanks for the comments on dates. Some of the respondents missed the point, by showing ways that I could work around the problems, when my main argument is that one shouldn't have to work around problems. So I hereto present round 2 of the debate. 1 Postulates a. In my 35 year computing experience, I think that nothing frustrates me more than a computer program that
2007 Jan 07
3
as.Date() results depend on order of data within vector?
Dear all, The as.Date() function appears to give different results depending on the order of the vector passed into it. d1 = c("1900-01-01", "2007-01-01","","2001-05-03") d2 = c("", "1900-01-01", "2007-01-01","2001-05-03") as.Date(d1) # gives correct results as.Date(d2) # fails with error (* see below) This problem
2005 Oct 10
3
sqlFetch on MySQL-DB
Dear all, I successfully set up a local MySQL-database. Connecting via RODBC is not problem, the same in fetching 3 of 4 tables. But trying to connect to table 4 fails. > author<-sqlFetch(test,"author") Error in fromchar(unclass(x)) : character string is not in a standard unambiguous format In principle I understand that error message, but I don't know any solution.
2007 Dec 31
1
read.dta error after OSX change in time zone
Hello all, I recently moved from the US to Africa & on changing my time zone in the OSX system preferences from EST to GMT+3 ( East Africa) on attempting to use read.dta using the foreign package began getting an error of: "Error in fromchar(x) : character string is not in a standard unambiguous format" This error goes away & the data is correctly read in when
2004 Feb 14
2
converting data to date format
Dear all, I import my data from a csv-file containing one row with date-entries. How can I tell R to treat this data as dates? I've tried to bring it in character-format (as.charachter()) followed by as.POSIXlt() but I get an error message, that the character string is not in a standard unambiguous format, although the date is of format yyyy-mm-dd (what is standard format according to R
2001 Oct 29
1
Help with 'get.hist.quote' on tseries
Hi ALL: I am trying to use get.help.quote from library(tseries). I tried to run the example from help(get.hist.quote) but R complained. Here is the command I used and the response: ibm <- get.hist.quote(instrument = "ibm", start = "1998-01-01") trying URL
2001 May 15
1
what happende to as.POSIC.ct ???
In my 1021-version I get: > version _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 2.1 year 2001 month 01 day 15 language R > as.POSIXct( "1970/01/01" ) [1]
2002 Jul 18
1
tseries (get.hist.quote)
Hi, i really positive surprised when i found the "get.hist.quote" but didn't now why i get with the examples from Online-Help errorMessages. Perhaps their is a problem with POSIX and my OS WIN2000/R1.5.1 ? Thanks for advance & regards,Christian $ ibm <- get.hist.quote(instrument = "ibm", start = "1998-01-01") trying URL `
2006 Jul 07
3
Converting data frame to zoo
Dear list, I know this is really basic question but I just couldn't get anything to work. (I did a R site search with keywords "zoo" and "data frame" but the server timed out on me.) I have a time series which has the following (typical) format, DATE Open High Low Close Volume 01-JAN-2006 5.25 5.25
2006 Jun 23
3
Problems with weekday extraction from zoo objects
Hi Folks! I'm struggling with dates - but enough about my personal life..... I have two daily time series files. In one (x) the date format is Y/m/d and the other (y) is d/m/y. I used read.zoo on both and they read into R with no problem. Then I use: weekdays(as.Date(x$DATE)) and get what I expect - all the days of the week in my data set. When I use: