similar to: suggestions re trunc.POSIXt

Displaying 20 results from an estimated 900 matches similar to: "suggestions re trunc.POSIXt"

2011 Mar 25
2
Preserving the class of POSIXt objects
Dear all, I am working with a list of objects each of which contains two POSIXct objects (say, $Start and $End) and a number of different data in addition to that. Now an easy way to extract Start times of all object could be sapply(x, "[", "Start") but this converts them all to numeric, and so does sapply(x, "[[", "Start"). lapply preserves the class but
2013 Apr 11
2
(no subject)
Dear all, Is there a quick and easy way of converting utf characters to the \uxxxx form (necessary e.g. for packages)? I mean something working like this: > utf2uxxxx("õäöü") [1] "\u00f5\u00e4\u00f6\u00fc" It is easy to program but perhaps someone already has implemented this. (I couldn't find anything useful from searches incl RSiteSearch). Thanks in advance, Kenn
2011 Mar 03
1
sqlFetch (RODBC) question
Dear all, I've used RODBC a lot to read in files created in MS excel and access but found a strange problem today: a variable in my data file contained both numbers and text; sqlFetch would set text within a row of numbers to NA; but if first 5 or 6 rows would be text then all numbers would be read in as NA. con<-odbcConnectExcel("xample.xls") #the file is attached or at
2011 Mar 21
1
Curry with `[.function` ?
Dear all, I sometimes use the following function: Curry <- function(FUN,...) { # by Byron Ellis, https://stat.ethz.ch/pipermail/r-devel/2007-November/047318.html .orig <- list(...) function(...) do.call(FUN,c(.orig,list(...))) } ... and have thought it might be convenient to have a method for [ doing this. As a simple example, > apply(M, 1, mean[trim=0.1]) # hypothetical
2013 Apr 11
0
Notes and warnings in building a package ('ms-dos style file name', 'no visible binding' and using .C("bincount", ..., PACKAGE = "base"))
Dear all, While buildign a package (R 2.15.2 on windows XP) I had three warnings/notes -- I would be grateful for any hints on what to do. 1. The first one is probably not really important if I'm not missing something: cygwin warning: MS-DOS style path detected: C:/x/y/z/package_1.0.tar.gz Preferred POSIX equivalent is: /cygdrive/c/x/y/z/package_1.0.tar.gz CYGWIN environment variable
2002 May 12
0
{round,trunc}.POSIXt and daylight savings time (PR#1543)
I have found what looks like a small problem in trunc.POSIXt() involving the transition to/from standard time and daylight savings time. Assuming my assessment is correct, I have a potential solution to offer. If a time in daylight savings time is rounded such that the rounded value is on the other side of the transition, the isdst element does not get changed accordingly. I have tested only
2002 May 17
0
round.POSIXt gets certain values wrong
For certain values, round.POSIXt(tm,'day') does not round to midnight as documented. The reason is that trunc.POSIXt() does not adjust the value of the isdst element. Assuming my assessment of the reason is correct, I have a potential solution to offer. Additional discussion is in bug report #1543. -Don > x <- c(as.POSIXct('2001-4-1 3:15'),as.POSIXct('2001-5-2
2007 Dec 11
3
Wrong length of POSIXt vectors (PR#10507)
Full_Name: Petr Simecek Version: 2.5.1, 2.6.1 OS: Windows XP Submission from: (NULL) (195.113.231.2) Several times I have experienced that a length of a POSIXt vector has not been computed right. Example: tv<-structure(list(sec = c(50, 0, 55, 12, 2, 0, 37, NA, 17, 3, 31 ), min = c(1L, 10L, 11L, 15L, 16L, 18L, 18L, NA, 20L, 22L, 22L ), hour = c(12L, 12L, 12L, 12L, 12L, 12L, 12L, NA, 12L,
2011 Feb 19
1
problem in plotting numeric x by POSIXt class with lattice
# hi all, # I'm trying to plot temperatures by date in a trellis plot by their stations # I'm plotting the following data.frame library(lattice) h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L), .Label = c("Ashqelon", "Beer Sheva",
2011 Apr 10
4
Password-protect R script files
There was a question in R forum very long time back.. on how to protect R Script files from inadvertent editing by users. There is a way to do this from within R, atleast in Windows XP I have tried this and it certainly works , The method is very different from the OS based folder protection route, however making available such a method in the open forum would only kill the very spirit of R.
2007 Oct 12
2
Q-type factor analysis
Hallo! Is there a package in R that does Q-type factor analysis? I know how to do principal component analysis, but haven't found any application of Q-type factor analysis. Thx, Julia -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
2008 Apr 29
1
Consecutive zeros in a vector
Suppose X is a long vector of integers (typically about 30000 elements). Is there an efficient way to detect whether there are at least N consecutive zeros in X, and if yes, where does this occur? for example, suppose X is: 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 2 0 1 2 0 0 0 2 2 2 2 2 ... and N is 10. I would like a foo(X, 10) to return something like c(6,19) (start and end positions in X
2011 Jan 04
5
scoping/non-standard evaluation issue
Dear r-devel list members, On a couple of occasions I've encountered the issue illustrated by the following examples: --------- snip ----------- > mod.1 <- lm(Employed ~ GNP.deflator + GNP + Unemployed + + Armed.Forces + Population + Year, data=longley) > mod.2 <- update(mod.1, . ~ . - Year + Year) > all.equal(mod.1, mod.2) [1] TRUE > > f <-
2004 Mar 05
1
Samba + Win2k
How can i get a trust relationship betwen Samba Domain and Win2k ? I?ve tried many ways like, change win2k register, changig some security directives, etc. The win2k is added at Samba Domain like this useradd -g MYGROUP -d /dev/null -s /bin/false WIN2k$ smbpasswd -a -m WIN2K$ Is there other way?? Thanks
2003 Aug 04
0
as.POSIXct Bug when used with POSIXlt arg and tz= arg (PR#3646)
Tracking down this bug was joint work with Jermoe Asselin (jerome at hivnet.ubc.ca) and Patrick Connolly (p.connolly at hortresearch.co.nz). We collectively were able to determine that this is a problem in both Windows 2000 and in Linux and by testing it in our three time zones that it seems to be daylight savings time related. Conversion of POSIXlt datetimes to POSIXct appears to have problems.
2015 Jun 24
0
yum and yumex change system time
On 06/23/2015 04:47 PM, g wrote: > > Richard, thank you for your response. > > > On 06/23/2015 02:51 PM, Richard wrote: > <<>> > >> I agree, so my questions are: >> >> - what is your TZ? > > u.s.a. 'central time zone' - currently on 'daylight savings time'. > >> - what does "[/bin/]date" show?
2016 Apr 11
0
Understanding POSIXct creation on different OSes.
Bumping this up to the front again ... because it exhibits a difference in behaviour of R across OSs. Such a 'feature' may not be desirable. On 4 April 2016 at 18:00, Arunkumar Srinivasan wrote: | Hello, | | Following Dirk's post here: https://github.com/Rdatatable/data.table/issues/1619 | we would like to clarify if this is the right behaviour, and if so, | the rationale behind it.
2016 Apr 04
2
Understanding POSIXct creation on different OSes.
Hello, Following Dirk's post here: https://github.com/Rdatatable/data.table/issues/1619 we would like to clarify if this is the right behaviour, and if so, the rationale behind it. Here's the summary (thanks to Dirk and Joshua): Sys.setenv("TZ"="America/Chicago") dates = as.Date("2016-03-02") + (0:3)*7 # four Wednesdays # [1] "2016-03-02"
2015 Jun 23
2
yum and yumex change system time
Richard, thank you for your response. On 06/23/2015 02:51 PM, Richard wrote: <<>> > I agree, so my questions are: > > - what is your TZ? u.s.a. 'central time zone' - currently on 'daylight savings time'. > - what does "[/bin/]date" show? [geo at boxen ~]$ date Tue Jun 23 14:54:42 CDT 2015 > - what does your hardware clock:
2009 Jul 15
1
Samba + ADS - Filepermissions home directories
I configured winbind, samba and pam.d to authenticate via our Windows Active Directory Server. Everything works fine, I can log on to the system using my Windows Account credentials, I am also able to access the samba home share, but I have no write permissions there. What I don't get is: When I give read-write-access to everybody (chmod 777 /home/%USER%), I am able to create and delete