search for: date_vec

Displaying 2 results from an estimated 2 matches for "date_vec".

Did you mean: date_var
2012 Aug 24
1
POSIXct-coerced NA's not considered NA by is.na()
Hello folks, I found a strangeness while experimenting with POSIXct vectors and lists. It seems that coerced NA's aren't "real" NAs, at least as considered by is.na()? > date_vec = c(as.POSIXct(now()), as.POSIXct(now()+1),NA,"b") > date_vec [1] "2012-08-22 15:00:46 COT" "2012-08-22 15:00:47 COT" NA [4] NA Warning message: In as.POSIXlt.POSIXct(x, tz) : NAs introduced by coercion > date_vec[4] [1] NA Warning message: In as.POSIXlt.POSIXct...
2009 Mar 26
2
Getting started,
...#This reads that data into a table data_download=read.table("Eurodollar_deposits1M.dat",skip=8,sep=",",head=T) #This is attempting to get R to read the date column, which is in "mm/dd/yyyy" format #I have restricted it to the first 50 data points (to keep it simple) date_vec = as.Date(data_download[1:50,1],"%m/%d/%y") #This reads the values again for just the first 50 data points eurodollar_vec = data_download[1:50,2] #This plots the date and data values. plot(date_vec,eurodollar_vec) A few issues with the output from this: 1) The date_vec data ends up...