Displaying 20 results from an estimated 1000 matches similar to: "R difftime function: How can we fix the difftime unit?"
2007 Mar 13
2
gtk button: how to create signal handler?
Hi
Kindly correct me if I am posting a wrong query in the forum.
I am trying to handle my "button:clicked" event. But not able to proceed
further. Please help.
Following is my code:
library(RGtk2)
win <- gtkWindowNew(type = NULL, show = TRUE)
butt <- gtkButtonNewWithLabel("Submit", show = TRUE)
win$Add(butt)
Now I want to do something when my button is clicked. How
2007 Mar 05
4
plot(): I want to display dates on X-axis.
Hi,
I want to display dates on my x-axis of the plot. I was trying to use plot()
command for the same and passing the values in following manner:
The variable "dat" is a data frame. The first column has numeric values and
second column has date.
e.g. dat
[,1] dat[,2]
[1,] 300 20060101
[2,] 257
2007 Feb 21
2
Splom plot:how to plot with different symbols?
Hi,
Kindly let me know if I posted a wrong question in the forum.
I want to draw a splom plot with different symbols in plot. My command is as
follows:
splom(~ log10(splomData[2:3]), groups = programs, data = splomData,
panel = panel.superpose,
key = list(title = paste(splomLoop,"Programs of Hog Analysis (Sorted by
LR(GB))"),
panel = panel.superpose,
columns =
2007 Jul 18
3
How to open an URL using RGtk2
Hi
I am working on R 2.5.0 on window. I am trying to provide a Hyper-link to
the user as a result, I have tried using gtkLinkButton to exercise the
facility, however, i am not able to perform the required task, i.e. when I
clicked on the LinkButton actually nothing happened.
I have gone through the documentation for the same and found that
GtkLinkButtonUriFunc is a function which is require to
2007 Mar 23
1
Creating new directory/folder from R script on run time.
Hi,
Please correct me if this request does not belong to this discussion forum.
Kindly suggest me if there is a way to create a new folder from R on
runtime?
for e.g.
>From one of my R script I want to store the PDF result file in a perticular
folder let say c:\tt
for that initially i am creating "tt" folder manually and using the
following command:
fname <-
2007 Apr 19
2
Accessing R applications from Web
Hi
I am trying to provide web interface to my R application. My requirements
are simple and can be written down as follows :
1) User must provide all the input parameters on web interface.
2) Based on the input values, R will do some computations.
3) Project the numerical results as well as plots as html page to the user
on web.
Kindly tell me which package can help me in doing this. Your help
2007 May 16
2
Running R function as a Batch process
Hi,
I am struggling with using R CMD BATCH command. Kindly suggest solution to
the following problem.
I have a function named CinC with accept two input parameters. This can be
shown as:
CinC <- function(start, end)
where start and end both are character strings.
Please suggest me how can I run this function using command R CMD BATCH.
Currently I am trying to do like this -> R CMD
2007 Feb 14
2
Is this a correct forum to discuss basic R problem?
Hi
Sorry if this is a wrong post in the forum. Please suggest if this is a
correct forum to discuss R related basic problem.
I wanted to perform the following task by using R:
e.g.
input data.frame
x y
============
a 10
b 20
a 10
a 10
b 15
b 15
b 20
In o/p i need
x
2007 Mar 01
1
R (Input from Keyboard): How do I remove error?
Hi,
I am trying to read some value from keyboard in one of my R program. I want
to do manipulation on data based on this value. But I am facing a problem
which is described below with the help of an example:
My code is similar to:
:
:
cat("\n","Enter value:: ","\n")
y<-scan(n=1)
a <- b*y
cat("\n","Enter new value::","\n")
2010 Jun 22
1
New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())
On Thu, Jun 10, 2010 at 3:39 PM, Gustaf Rydevik
<gustaf.rydevik at gmail.com> wrote:
> Hi all,
>
> The recent change in 2.11 that made as.numeric() return false on
> difftime-objects broke some of my code that calculated age classes of
> individuals using cut(). While this was no big thing to fix for me, it
> might be wise
> to provide a cut.difftime method to ?stop
2010 Jun 22
1
New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())
On Thu, Jun 10, 2010 at 3:39 PM, Gustaf Rydevik
<gustaf.rydevik at gmail.com> wrote:
> Hi all,
>
> The recent change in 2.11 that made as.numeric() return false on
> difftime-objects broke some of my code that calculated age classes of
> individuals using cut(). While this was no big thing to fix for me, it
> might be wise
> to provide a cut.difftime method to ?stop
2006 Apr 03
1
weird "max" behavior for difftime class
If you apply the "max" function to a vector of class "difftime" with
units="days", the returned value is in units of "seconds".
Is this not a bug? At any rate it can lead to confusing results if one
buries a call to "max" deep in some data analysis code.
Details:
> y<-structure(1, class = "difftime", units = "days")
2009 Feb 06
1
Operations on difftime (abs, /, c)
Since both comparison and negation are well-defined for time differences, I
wonder why abs and division are not defined for class difftime. This
behavior is clearly documented on the man page: "limited arithmetic is
available on 'difftime' objects"; but why? Both are natural, semantically
sound, and useful operations and I see no obvious reason that they should
give an error:
2009 Feb 06
1
Operations on difftime (abs, /, c)
Since both comparison and negation are well-defined for time differences, I
wonder why abs and division are not defined for class difftime. This
behavior is clearly documented on the man page: "limited arithmetic is
available on 'difftime' objects"; but why? Both are natural, semantically
sound, and useful operations and I see no obvious reason that they should
give an error:
2013 Jul 09
1
Is difftime a "class"
I am trying to write S4 methods with "difftime" in the signature but
am being "informed" (? not a warning or error) that "difftime" is not
a class. Nevertheless, dispatch takes place. Should I simply ignore
that "information"? Here is a toy example:
> setClass("foo", contains = "Date")
> setMethod("+", c("foo",
2011 Oct 25
2
difftime producing NA values in R 2.12.2
R-listers,
I have noticed several posts on issues with difftime producing NA's
but they have been for older versions of R. Here's the issue
associated with difftime that I am dealing with in R 2.12.2.
> preciptime = strptime("01/10/2007 14:00",format="%m/%d/%Y %H:%M")
> class(preciptime)
[1] "POSIXlt" "POSIXt"
> # Now using difftime, this
2018 Aug 01
1
RFC: make as.difftime more consistent or convenient
Hello!
you, Emil Bode <emil.bode at dans.knaw.nl>, wrote on Tuesday, July 31, 2018 1:55 PM:
> Some of the changes you're proposing could be made (with effort), but note that you're not
> restricted to providing strings with a format.
> What you're trying to do can be accomplished with as.difftime(12, units='weeks'), see also
> ?as.difftime
>
> Or if
2010 Apr 05
1
using difftime()
I'm new to R and have the following problem with difftime:
if I directly assign date/time strings in difftime I get the expected
result:
> a<-"2010-03-23 10:52:00"
> a
[1] "2010-03-23 10:52:00"
> b<-"2010-03-23 11:53:00"
> u2<-as.difftime(c(a,b), format ="%Y-%m-%d %H:%M:%S", units="mins")
> u2
Time differences in mins
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 Sep 25
1
Collision between difftime and ggplot2.
It seems that there are several folks Out There with an itch to
scratch with respect to difftimes.
http://article.gmane.org/gmane.comp.lang.r.devel/19223/match=difftime
http://article.gmane.org/gmane.comp.lang.r.devel/18441/match=difftime
http://article.gmane.org/gmane.comp.lang.r.devel/10882/match=difftime
http://article.gmane.org/gmane.comp.lang.r.devel/11675/match=difftime
and I might be