similar to: 'mean' is not reverted in median() as NEWS says (PR#13731)

Displaying 20 results from an estimated 10000 matches similar to: "'mean' is not reverted in median() as NEWS says (PR#13731)"

2009 Apr 14
2
any other fast method for median calculation
Hi there, I got a data frame with more than 200k columns. How could I get median of each column fast? mapply is the fastest function I know for that, it's not yet satisfied though. It seems function "median" in R calculates median by "sort" and "mean". I am wondering if there is another function with better algorithm. Any hint? Thanks, Xin Zheng
2009 Mar 10
4
puzzled by math on date-time objects
Hi, I don't understand the following. When I create a small artificial set of date information in class POSIXct, I can calculate the mean and the median: a = as.POSIXct(Sys.time()) a = a + 60*0:10; a [1] "2009-03-10 11:30:16 EDT" "2009-03-10 11:31:16 EDT" "2009-03-10 11:32:16 EDT" [4] "2009-03-10 11:33:16 EDT" "2009-03-10 11:34:16
2004 Oct 05
2
correct my method of estimating mean of two POSIXlt data frames
Hello, I searched the archives but could not come to a solution. I have to two columns of information t_start_cdt looks like: > t_start_cdt[1:4] [1] "2003-07-09 11:02:25" "2003-07-09 11:10:25" "2003-07-09 11:30:25" [4] "2003-07-09 12:00:25" > class(t_start_cdt) [1] "POSIXt" "POSIXlt" t_end_cdt looks like: > t_end_cdt[1:4]
2009 May 29
4
R's documentation
Sometimes I get confused with R's documentation. It seems the documents is not maintained and updated well. Anyone has similar feeling? I don't mean to offend anyone. I hope R would get better and better. But documentation is really one very important factor which could attract people coming or drive people away. Xin Zheng [[alternative HTML version deleted]]
2009 Mar 04
2
patch for axis.POSIXct (related to timezones)
I am finding that axis.POSIXct uses the local timezone for deciding where to put tic marks, even if the data being plotted are in another time zone. The solution is to use attr() to copy from the 'x' (provided as an argument) to the 'z' (used for the 'at' locations). I have pasted my proposed solution in section 1 below (as a diff). Then, in section 2, I'll put some
2009 Sep 09
1
Monkey patching +.POSIXt
Hi all, This summer I've been working with a grad student to bring more of the date time classes from JODA (http://joda-time.sourceforge.net/) into R. To make these work seamlessly with existing date time objects, we need to patch +.POSIXt. (The ruby community uses the term monkey-patching for this sort of ill-advised, by sometimes necessary, internal hackery, hence the title.) The problem is
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
Technically, there is a round() for 'Date' objects, but it doesn't seem very useful, because it basically just fall back to the default round() method, which only takes the 'digits' argument. Here's an example: > date <- Sys.Date() > class(date) [1] "Date" We see that there are only two round() methods in addition to the implicit built-in one; >
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
?s 14:36 de 08/02/2024, Olivier Benz via R-devel escreveu: >> On 8 Feb 2024, at 15:15, Martin Maechler <maechler at stat.math.ethz.ch> wrote: >> >>>>>>> Ji?? Moravec >>>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes: >> >>> This is my first time working with dates, so if the answer is "Duh, work >>> with
2011 Feb 14
3
how to order POSIXt objects ?
I have a problem ordering by descending magnitude a POSIXt object. Can someone help please and let me know how to work around this. My goal is to be able to order my data by DATE and then by descending TIME. I have tried to include as much info as possible below. The problem stems from trying to read in times from a CSV file. I have converted the character time values to a POSIXt object using the
2003 Sep 07
1
extracting monthly temperature data
I know that R is very advanced when it comes to DateTime handling. I am not quite as advanced as R however. I just downloaded a stupendously ugly dataset of hourly air temperature from 1985 to 2003. It has a great many NAs. I want to extract mean, median, max, and min monthly values. So far I have read it in as object. Date and Time are factors and Temp is an int. > summary(temp.dat)
2002 Mar 26
1
seq.POSIXt() with short time intervals
I was surprised when seq.POSIXt() returned a single value rather than a vector, from inputs that I thought were reasonable. Here's an example to illustrate: > t0 <- ISOdatetime(2002,6,24,0,0,10) ## expected a sequence of 16 times 1 second apart > seq.POSIXt(from=t0,to=t0+15,by='1 sec') [1] "2002-06-24 00:00:10 PDT" ## traces to this call >
2009 May 28
3
how to avoid add 'X' before numeric colnames when read.table
Hi all, Is there any way to keep numeric colnames as is? Any hint will be appreicated. Xin Zheng [[alternative HTML version deleted]]
2024 Feb 08
2
round.Date and trunc.Date not working / implemented
> On 8 Feb 2024, at 15:15, Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>>> Ji?? Moravec >>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes: > >> This is my first time working with dates, so if the answer is "Duh, work >> with POSIXt", please ignore it. > >> Why is not `round.Date` and
2001 Sep 25
1
blues in c
G'Day, I'm a little confused why the c function has the followng effect on classes - is this a feature ? My workround [ class(cc) <- c("POSIXt", "POSIXct") ] seems to do the job. Many thanks Bernie McConnell "R version 1.3.1, 2001-08-31" on NT > aa <- as.POSIXct("2001-09-23") > bb <- as.POSIXct("2001-09-24") > cc
2009 Jul 08
1
R 2.9.0 plot still forcing current time zone
the help page for plot.POSIXct says "As from R 2.9.0 the date-times for a '"POSIXct"' input are interpreted in the timwzonw give by the '"tzone"' attribute it there is one, otherwise the current timezone. (Earlier vrsions always used the current timezone.)" however I am using 2.9.0 on linux and the following still happily produces an
2010 Feb 01
1
Error with cut.POSIXt and daylight savings time switchover dates
The following code: cut(as.POSIXct("2009-11-01 04:00:00", tz="America/Los_Angeles"), "1 day") gives the error: Error in seq.int(0, to - from, by) : 'to' must be finite This is related to November 1st, 2009 being the switchover date from daylight savings time to standard time in the America/Los_Angeles time zone. In particular, in cut.POSIXt, the starting
2007 Jan 04
3
problem with plot() and POSIXt dates
Hy all, I'm plotting graphs using plot() function, they are on X axes POSIX dates: "POSIXt" "oldClass" "POSIXct" "POSIXlt" I can't figure out why sometimes it prints the month and days and sometimes it prints the unix timestamp. It appens usually when the xlim is short like only some days. xlim is settled as a POSIXt like this "2006-12-30
2007 Feb 21
1
Adding difftime objects to POSIXt objects
Hello, ?DateTimeClasses states that "one can add or subtract a number of seconds or a 'difftime' object from a date-time object, but not add two date-time objects." So, is the below expected behavior? > x <- Sys.time() > x [1] "2007-02-21 16:19:56 CST" > x + as.difftime("1","%H") [1] "2007-02-21 16:19:57 CST" Warning
2009 Oct 15
2
forwarded: bug (?) in cut.POSIXt with "breaks"=integer
From: Vitalie S. <vitosmail <at> rambler.ru> Subject: Bug in cut.POSIXt Newsgroups: gmane.comp.lang.r.general Date: 2009-10-15 15:47:48 GMT (1 hour and 29 minutes ago) Hello Everyone, Before reporting decided to post here first: tt <- structure(c(1254238817, 1254238859, 1254238969, 1254239080), class = c("POSIXt",
2009 Nov 19
0
Wishlist: In documentation, say that `+.Date`(Date, difftime) should be called directly or remove 'or an object of class "difftime"' (PR#14072)
Full_Name: Suharto Anggono Version: 2.8.1 OS: Windows Submission from: (NULL) (125.161.134.206) About PR#14067, now I understand why (Date + difftime) does not use '+.Date'. But, before I understand, it was surprising. The surprise is also reflected in the post "Problem with +(POSIXt, difftime) dispatching -- WAS: How to create sequence of constant time interval" in R-help