search for: unix2posixct

Displaying 5 results from an estimated 5 matches for "unix2posixct".

2010 Feb 19
1
r help date format changes with c() vs. rbind()
Dear List, I am having a problem with dates and I would like to understand what is going on. Below is an example. I can produce a date/time using as.POSIXct, but I am trying to combine two as.POSIXct objects and keep getting strange results. I thought I was using the wrong origin, but according to structure(0,class="Date") I am not (see below). In my example a is a simple date/time
2007 Sep 27
3
testing the contents of an environment
Suppose I want to delete everything in my working directory that is not a function. It seems that sapply(ls(),is.function) always returns FALSE, because ls() returns objects of mode character. How do I evaluate is.function(), not on a character string, but on the object that character string represents? Thanks, Tim
2011 Oct 05
2
any way to convert back to DateTime class when "accidental" conversion to numeric?
Hi, In short, I would like to know if there is any way to convert a numeric into a date, similar to how strptime() can convert a string to a date time class? There are some functions, etc. which don't work well with dates, and tend to force them into numerics. I understand that the number it spits back is the number of seconds since the beginning of 1970 (see the first few sentences
2011 Jul 29
5
coordinates from locator function in POSIXct format
Dear R-list, I have a plot with y-axis corresponding to wind measurments and x-axis with date-time information. When I want to identify some extrem wind events in the wind-curve, I use locator() to get the exact date-information, by clicking in the points in graph I?m interested in. I get in the R console the x and y coordinates. The x coordinates are not in a POSIXct format, I guess R is
2008 Jan 03
2
retaining formatting when converting a vector to a matrix/data.frame?
Please see example code below. I have a vector ("mydata") of length 10. "mydata" can have various formats (e.g. numeric, text, POSIXct, etc) I use the matrix and data.frame functions to convert "mydata" to a dataframe ("mydf") of 2 columns and 5 rows. What is a "good" way to ensure that the format is retained when I create the