search for: fromchar

Displaying 20 results from an estimated 34 matches for "fromchar".

2008 Apr 11
1
Error in fromchar(as.character(x)) : character string is not in a standard unambiguous format
...lculate a variable named F.length, which is today's date minus the values contained in the variable: April$Order.Made.Date) I tried altering the date format but continued to receive the same error. > F.length <- difftime ("11/04/2008", April$Order.Made.Date) > Error in fromchar(as.character(x)) : character string is not in a standard unambiguous format > Order.date <- as.Date (April$Order.Made.Date) > Error in fromchar(x) : character string is not in a standard unambiguous format > Order.date <- 'as.POSIXlt' (April$Order.Made.Date) Error...
2002 Feb 28
1
Bug in julian() (PR#1332)
...000 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 standard unambiguous format > julian function (x, ...) UseMethod("julian") > julian.POSIXt function (x, origin = as.POSIXct("1970-01-01", tz = "GMT"), ...) { if (length(origin) != 1) stop("`origin' must be...
2009 Jan 21
3
Error as.Date on Invalid Dates
...;- "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 <- "2009-02-29" # Note: 2009 not a leap year > as.Date(date1) Error in fromchar(x) : character string is not in a standard unambiguous format As I have many instances of date entries like this, date1, date2, date3, etc. , I'd like the script to error out gracefully and to be able to point the user to which date they need to correct, rather than "Error in fromchar(x...
2004 Oct 11
5
read "4-jan-02" as date
...ery 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 doing wrong? As far as I can see the character strings are in standard format. d$Date <- as.Date(d$Date, format="%d-%b-%y") Error in fromchar(x) : character string is not in a standard unambiguous format 2. as.date {Survival} produces this error, d$Date <- as.date(d$Date, order = "dmy") Error in as.date(d$Date, order = "dmy") : Cannot coerce to date format 3. Assuming all else fails, is there a text function simi...
2008 Aug 06
3
Help in running Stata dataset in R
Dear All, I installed R 2.7.0 and tried to call a dataset i had ealier own called on R2.6.2 but i keep on getting an error: use("maltreat.dta") Error in fromchar(x) : character string is not in a standard unambiguous format Tried doing the same with R2.7.1 but i get the same error. However if i call the same on R 2.6.2, there is no error: use("maltreat.dta") > des() No. of observations = 670 Variable Class Descr...
2004 Mar 08
5
years from as.POSIXlt
Hi, how it's possible to extract the year and the number of days from Julian date. i'm little confused about the last two functions and ?years . EDATE comes from sqlQuery with as.is=T EDATE <- as.POSIXlt(datvears$ENROLLDAY) Many thanks, Christian > EDATE[1:5] [1] "2000-06-30 11:25:01" "2000-06-30 11:39:55" "2000-06-30 12:11:11" [4]
2001 Oct 04
1
get.hist.quote does not work (PR#1116)
...ote does not work yet, since the function julian does not work. Is this problem only in my computer? The previous version of get.hist.quote (tseries 0.7-0) did work. Sys.time and julian produce > Sys.time() [1] "2001-10-04 15:33:14 GTB Daylight Time" > julian(Sys.time()) Error in fromchar(x) : character string is not in a standard unambiguous format > get.hist.quote produces x <- get.hist.quote(instrument = "^spc", start = "1998-01-01", + quote = "Close") trying URL `http://chart.yahoo.com/table.csv?s=^spc&a=01&b=0...
2007 Feb 16
0
Request: make as.POSIXlt generic
...nable Gabor to create methods for his 'zoo' series, and let me create methods for my 'tis' (Time Indexed Series). But these are not as urgent as cleaning up as.POSIXlt(). Jeff Hallman The current as.POSIXlt() implementation: as.POSIXlt <- function(x, tz = ""){ fromchar <- function(x) { xx <- x[1] if(is.na(xx)) { j <- 1 while(is.na(xx) && (j <- j+1) <= length(x)) xx <- x[j] if(is.na(xx)) f <- "%Y-%m-%d" # all NAs } if(is.na(xx) || !is.na(strptime...
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
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 I revert to the EST time zone. I installed & am currently using R Version 1.19-pre (devel, r4291) (4291) while I was still in the US. I am running OS X 1...
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. Thanks for any help, Bernd > version _ platform i386-pc-mingw32 arch i386...
2006 Jul 07
3
Converting data frame to zoo
...ted to a data frame which I thought is fine. Now I want to convert it to zoo so I did x <- zoo(my.df) which works just fine. But the Date column has been turned into a factor. Is there a way to make it into a Date. I've tried, x$Date <- as.Date(x$Date) but R complains that Error in fromchar(x) : character string is not in a standard unambiguous format Thanks in advance. Horace W. Tso ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/pos...
2006 Jun 23
3
Problems with weekday extraction from zoo objects
...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: weekdays(as.Date(y$Date)) I get: Error in fromchar(x) : character string is not in a standard unambiguous format I've tried to set the format= in read.zoo to format="%d/%m/%Y" but this doesn't seem to solve the problem. What's going on here? (I'm new to these dates functions, so please be patient - I'll get th...
2004 Jun 02
2
Bug with date 1970-01-01 on Windows (PR#6929)
...t;,"%Y%m%d") Time difference of NA secs > strptime("20040602","%Y%m%d")-strptime("19700102","%Y%m%d") Time difference of 12569.96 days I get as well the bug reported in 1332: > as.POSIXct("1970-01-01", tz = "GMT") Error in fromchar(x) : character string is not in a standard unambiguous format Regarding hint on msvcrt.dll in Windows-FAQ on R: The downloaded archive contains: msvcrt.dll 4.20.0.6164 msvcrt20.dll 2.11.0.0 msvcrt40.dll 4.10.0.5349 My Windows 2000 System has the following versions in ...\system32: msvcrt.dll 6.1....
2008 Jul 25
0
Errror in running R2.7.1 version to R2.6.2 version
...;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 is not in a standard unambiguous format use("maltreat.dta") Error in fromchar(x) : character string is not in a standard unambiguous format I have attached the datasets (Stata datasets) herein. Kind regards, Lazarus Mramba Junior Statistician P.O Box 986...
2001 Oct 29
1
Help with 'get.hist.quote' on tseries
...//chart.yahoo.com/table.csv?s=ibm&a=01&b=01&c=1998&d=10&e=28&f=2001&g=d&q=q&y=0&z=ibm&x=. csv' Content type `application/octet-stream' length unknown opened URL downloaded 45Kb time series starts 1998-01-02 time series ends 2001-10-26 Error in fromchar(x) : character string is not in a standard unambiguous format > Can anyone help? (I use R 1.3.1 with Windows 2000.) Thanks, ANDREW Andrew Criswell, Ph.D. Graduate School, Bangkok University -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing...
2001 May 15
1
what happende to as.POSIC.ct ???
...rch x86 os Win32 system x86, Win32 status major 1 minor 2.3 year 2001 month 04 day 26 language R > as.POSIXct( "1970/01/01" ) Error in fromchar(x) : character string is not in a standard unambiguous format Apparently the error comes out of as.POSIXlt which is called by as.POSIXct, and it looks as if the behaviour of strptime has changed. But I cannot find any differences in the code. Any clues?? ---------------------- Bendix Carstensen...
2002 Jul 18
1
tseries (get.hist.quote)
...-01") trying URL ` http://chart.yahoo.com/table.csv?s=ibm&a=01&b=01&c=1998&d=07&e=17&f=2002&g=d&q=q&y=0&z=ibm&x=.csv ' Content type `application/octet-stream' length unknown opened URL downloaded 48Kb time series starts 1998-01-02 Error in fromchar(x) : character string is not in a standard unambiguous format -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the...
2005 May 01
0
Re: (PR#7826) ... segfault during build of 2.1.0 on RH9; print.POSIXct ...
...t; longer match. > > Probably both should use the double ellipses, but "..." will be empty > on automatic printing, so that's not it. > > The issue is an infinite recursion inside as.POSIXlt(). Specifically, > strptime() internally calls as.character(x) inside the fromchar() > function in as.POSIXlt(), and as.character.POSIXt() invokes format() > which calls as.POSIXlt() again. > > I think the fix is to unclass(x) inside fromchar(), but perhaps others > know better? > > > -- > O__ ---- Peter Dalgaard Blegdamsvej 3 >...
2007 Sep 17
2
Date vs date (long)
...care missing the exact birthday by a day or so.)" As I said, division is a hard case with no clear answer. The creation of other unit schemes is silly --- why in the world would I voluntarily put on a straightjacket? d. >> as.Date('09Sep2007') >> > Error in fromchar(x) : character string is not in a standard unambiguous format My off-the-cuff suggestion is to make the message honest Error in fromchar(x): program is not able to divine the correct format The problem is not that the format is necessarily wrong or ambiguous, but that the program can't gu...