search for: chartodate

Displaying 14 results from an estimated 14 matches for "chartodate".

2012 Jan 11
0
Error in charToDate(x)
...In max(i) : kein nicht-fehlendes Argument f?r max; gebe -Inf zur?ck Can someone please please tell me what I am doing wrong? I guess it is something very simple and I'm just stupid here. Thank you guys very much!!! Marco -- View this message in context: http://r.789695.n4.nabble.com/Error-in-charToDate-x-tp4287158p4287158.html Sent from the R help mailing list archive at Nabble.com.
2011 Jun 01
2
Problems Dating....
...2 [1] "Qty" > class(dsort$Date) #checked data type of column "Date" and it came back as a factor [1] "factor" > Date2=as.Date(dsort$Date) #attempt at changing the data type from a factor to a date object (see error below). Error in charToDate(x) : character string is not in a standard unambiguous format Dates in my table are listed in "3/4/2007" format. StatBat2 [[alternative HTML version deleted]]
2011 Jul 26
2
How to use as.Date (or something else) with "31-Jul-2010 23:59:00"
Hello I have a huge file (not an R-file) in which the first column is a string with date, hour, minutes and seconds (For instance, "31-Jul-2010 23:59:00"). I tried as.Date but the error msg was "Error in charToDate(x) : character string is not in a standard unambiguous format". I have checked the help for the function as well as date but to no avail. How can that sort of string be transformed to something useful in R? Many thanks Ed
2011 Jun 24
2
SQL Changing Data Type
...1st Qu.: 1.000 15063.0: 15 18 : 82 Median : 2.000 15082.0: 15 19 : 79 Mean : 4.195 15125.0: 15 20 : 76 3rd Qu.: 7.000 15044.0: 14 7 : 75 Max. :20.000 (Other):762 (Other):377 > thedate <- as.Date(df.final$Date) Error in charToDate(x) : character string is not in a standard unambiguous format > -- View this message in context: http://r.789695.n4.nabble.com/SQL-Changing-Data-Type-tp3623508p3623508.html Sent from the R help mailing list archive at Nabble.com.
2010 Dec 10
1
importing date vector with read.table
...still struggling a bit to read a .txt file with a date vector. My code is as below: data<-read.table(file.choose(),header=TRUE,sep="\t",dec=",",colClasses=c("Date","numeric","numeric","numeric")) But I am getting an error: Error in charToDate(x) : character string is not in a standard unambiguous format because my date vector is in a format below: format="%d.%m.%Y" But how can i define the date format for date vector in read.table function....? Br, Jack [[alternative HTML version deleted]]
2012 Jan 11
2
Checking dates for entry errors
...that R will read?the incorrectly entered date "11/23/21931" without producing a warning or an?error message at least under some circumstances. ? > as.Date("11/23/21931", format = "%m/%d/%Y") [1] "2193-11-23" > as.Date("21931-11-23") Error in charToDate(x) : character string is not in a standard unambiguous format Similarly, under some circumstances, R will convert an impossible date like February 31, 2011 to NA rather than issuing a warning. > as.Date("02/31/2011", format = "%m/%d/%Y") [1] NA > as.Date("2011-0...
2012 Jun 07
1
factor coercion with read.csv or read.table
...: $ Date : Factor w/ 510 levels "Apr 28, 1972",..: 98 178 134 311 13 342 268 228 55 481 ... $ index: Factor w/ 510 levels "100","1,000.302",..: 1 499 493 488 444 412 418 434 441 448 ... > msci$Date <-as.Date(msci$Date, dateFormat='%b %d, %Y') Error in charToDate(x) : character string is not in a standard unambiguous format -- View this message in context: http://r.789695.n4.nabble.com/factor-coercion-with-read-csv-or-read-table-tp4632622.html Sent from the R help mailing list archive at Nabble.com.
2013 Apr 30
0
performance issue with as.Date
...er of stat() system calls to /etc/timezone was limiting how many scripts could be run effectively. I traced the problem to as.Date.character where strptime() is called without a timezone argument when there is no format argument. as.Date.character <- function(x, format="", ...) { charToDate <- function(x) { xx <- x[1L] if(is.na(xx)) { j <- 1L while(is.na(xx) && (j <- j+1L) <= length(x)) xx <- x[j] if(is.na(xx)) f <- "%Y-%m-%d" # all NAs } if(is.na(xx) || !is.na(strptim...
2017 Jun 22
2
For loop
...ot;] - leafbiom97$LeafBiog[leafbiom97$Date == "i-1"]+ Litterfall_Ahmed97$littperiod[Litterfall_Ahmed97$Date =="i"])/ (sum(GPP_Ahmed13$GPP[GPP_Ahmed13$Date >= "i-1" & GPP_Ahmed13$Date <= "i"])/2) } #Error in charToDate(x) : Thanks for your help Ahmed Attia, Ph.D. Agronomist & Soil Scientist
2018 Jun 22
1
Bug in as.Date or strptime?
...to behave like example 6 below as.Date(x = '1',format = '%j', origin= '2015-01-01') #[1] "2018-01-01" # example 5 # right, documented. x of class 'character' needs argument 'format' as.Date(x = '1', origin= '2015-01-01') #Error in charToDate(x) : # string de caracteres n?o ? um formato padr?o n?o amb?guo # example 6 # the safe way, the only one that outputs the right date as.Date(x = '1', format = '%j', origin= as.Date('2015-01-01')) #[1] "2018-01-01" sessionInfo() R version 3.4.4 (2018-03-15) P...
2009 Nov 25
3
Feature request for as.Date() function
Hello - I have a csv file with a few date columns. Some of the records have an "NA" character string instead of the date. When I attempt to use read.csv() and typecast the columns using colClasses, I receive the following error: Error in charToDate(x) : character string is not in a standard unambiguous format Similarly, the following command produces the same error: as.Date("NA") However, as.Date(NA) performs as documented. Can we enhance the as.Date() function to convert "NA" strings into NA value prior to ty...
2012 Nov 07
0
Strange behaviour in as.Date
I have been having trouble passing a default argument to base::as.Date.character and think it is due to some funkiness in the function definition. base::as.Date.character is defined as function (x, format = "", ...) { # stuff deleted res <- if (missing(format)) charToDate(x) else strptime(x, format, tz = "GMT") as.Date(res) } which gives unexpected behaviour when passing a default value of "" for format. I think the check "if(missing(format))" should really be "if(format=="")". Defining the wrapper: as.Dat...
2011 Jul 17
3
How to convert number (matlab) to date
Hello I am new to R and I need to convert some dates (numeric format by matlab) to actual dates in R. For instance, Matlab -> 730456 -> >> datestr(730456) ans = 02-Dec-1999 R - > library(zoo) > as.Date(730456) [1] "3969-12-03" I don't not mind the output format but it needs to be right. Many thanks Ed
2013 Apr 12
5
how to change the date into an interval of date?
Hi, I am not sure I understand your question correctly. dat1<- read.table(text=" id??????????? responsed_at???????????????? number_of_connection????????????????? scores 1????????????????? 12-01-2010?????????????????????????????????? 1????????????????????????????????????????????? 2 1????????????????? 15-02-2010??????????????????????????????????