Displaying 20 results from an estimated 2000 matches similar to: "difftime error"
2010 Oct 13
1
Date Time Objects
I am trying to convert an array from numeric values back to date and time
format.  The code I have used is as follows;
for (i in 0:(length(DateTime3)-1))	{
	DateTime3[i] <- (strptime(start, "%m/%d/%Y %H:%M")+ i*interval)
where start <- [1] "1/1/1981 00:00"
However the created array (DateTime3) contains [1,] 347156400 347157600
347158800 347160000 347161200 347162400
2010 Oct 15
3
Create Arrays
Hi,
For this example:
O <- c(0 0 0 2 0 0 2 0)
I want to create an array every time O[i] > 0.  The array should be in the
form;
R[j] <- array(-1, dim=c(2,O[i])) 
i.e. if O[i] > 0 4 times I want 4 R arrays.
Does anyone have any suggestions?
Thanks,
Doug
-- 
View this message in context: http://r.789695.n4.nabble.com/Create-Arrays-tp2996706p2996706.html
Sent from the R help
2011 Mar 08
4
If Statement
Hi,
I am having some problems using the if statement correctly.  I have used it
many times previously so I dona't know what is different with this case. 
Here is my problem:
I have a 1X10 matrix of values as follows:
> H.MC
          [,1]
 [1,] 4.257669
 [2,] 7.023242
 [3,] 4.949857
 [4,] 5.107000
 [5,] 4.257669
 [6,] 4.257669
 [7,] 4.257669
 [8,] 4.257669
 [9,] 4.257669
[10,] 4.257669
2007 Jun 02
4
Datapoints underneath datapoints Problem
Hi there.
I have the following graph:
http://www.nabble.com/file/p10928148/map.jpg 
However, some datapoints occur at the same place as other datapoints and are
so layered on top of each other. I would like to know if there is any
possible way in which I could view those datapoints that are layered on top
of each other ...maybe by rotating using latitude to show the datapoints
underneath (but
2010 Oct 13
1
Data Gaps
R community,
I am trying to write a code that fills in data gaps in a time series.  I
have no R or statistics background at all but the use of R is proving to be
a large portion of my PhD research.
So far my code identifies where and the number of new entries required but I
do not know how to add additional rows or columns into an array.  Any advice
on how this can be done?
Here is an example:
2010 Nov 10
3
Plot Axes
R community,
I am creating a bivariate return level plot by adding calculated return
period values as lines onto an existing plot using the following code with
the points representing the return periods.
plot(H2,D2,pch="+",axes=TRUE)
points(H.10,D.10, type="l",col="blue")
points(H.20,D.20, type="l",col="green")
points(H.50,D.50,
2008 Apr 15
4
heavy graphs
Dear R community,        I am creating large graphs with hundreds of
thousands of datapoints. My usual way for output was pdf, but now I am
getting file sizes of >30Mb that do not open well (or at all) in Adobe. Is
there a way to reduce the resolution or get rid of overlaying datapoints?
Any other idea is also warmly welcome!
Thank you and wishing you a good day!
Georg.
**********************
2010 Jun 07
2
graphical representation of a correlation between 3 variables (~30 datapoints)
Dear Ms and Mr R,
     I am seeking a visually appealing presentation of 3 variables (~30
datapoints) that are correlated and that should to into the same direction.
The objective is to show that they do go in the same direction and what
differences there might be while also giving an idea of the values of the
variables.  I had done this with simple bargraphs for 6 datapoints in the
past, but for
2011 Sep 09
2
How to translate the 2D-density matrix (the output of bkde2D function) into matrix of datapoints' amounts?
It is known that function bkde2D (package "KernSmooth") returns a matrix of
density estimates over the mesh induced by x1 and x2. In Details it is
written that "... heights of the kernel, scaled by the bandwidths, at each
datapoint are summed. This sum, after a normalization, is the corresponding
fhat value in the output". 
There are several questions:
1) How to calculate
2007 Jun 16
2
Visualize quartiles of plot line
Hello,
I'm currently using a simple plot to visualize some mean values. I'm
having ~200 datapoints on the x-axis, each has 10 records. I'm
currently plotting only the mean value of each of the datapoints.
What I need is a way to visualize the quartiles/error/whatever of
these points. I thought about boxplots, but I have to many points on
the xaxis - it would be impossible to see
2003 Dec 08
3
stripchart problem
Hello,
I am trying to plot age distribution data for a certain condition that
runs in families. Below is a simplified view of the dataset, i.e. in
this case there are four families, each line corresponding to one
individual with age at diagnosis and sex.
> famdata
   family age sex
1    fam1 2.1   f
2    fam1 2.3   f
3    fam1 1.0   m
4    fam2 7.3   f
5    fam2 4.1   f
6    fam2 1.2   f
7   
2010 May 24
5
Means do not tally
Hi all,
here is my situation
In my experiment, I expose 10 subjects to 24 different conditions of
stimuli. Each condition is exposed to the same subject 3x.
This would make each subject have 24x3=72 data points. All the subjects
combined would have 72x10=720 data points with each condition having 30
datapoints.
To find the grand average of each condition, I find the average of all the
2010 Jun 23
4
Comparing distributions
I am trying to do something in R and would appreciate a push into the
right direction. I hope some of you experts can help.
I have two distributions obtrained from 10000 datapoints each (about
10000 datapoints each, non-normal with multi-model shape (when
eye-balling densities) but other then that I know little about its
distribution). When plotting the two distributions together I can see
that
2007 Aug 14
3
diffusing GIS data in maps
Hi-
I am trying to find a way to diffuse GIS data on a European map. I have a
dataset consisting of particular locations scattered across Europe,
along with magnitude and value information. I can plot these as discrete
points with something like the following:
"geocode" is a dataframe with four columns: LAT; LONG; MAGNITUDE;VALUE.
library(maps)
library(mapdata)
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
2009 Nov 16
0
(Date + difftime) and (POSIXt + difftime) does not use date/time arithmetics (PR#14067)
Full_Name: Suharto Anggono
Version: 2.8.1
OS: Windows
Submission from: (NULL) (125.165.81.48)
There is already PR#13369. But, the problem is not just the warning.
C:\Program Files\R\R-2.8.1\bin>R --vanilla
R version 2.8.1 (2008-12-22)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome
2007 Mar 22
2
R difftime function: How can we fix the difftime unit?
Hi,
I am trying to take difference of two time objects. I want to fix the
result's unit to minutes. How can I do that?
Here is an example:
> difftime(x, y)
Time difference of 2.030720 hours
> difftime(x, z)
Time difference of 30.34672 mins
where x = '2007-03-05 08:32:58'
          y = '2007-03-05 06:31:07'
and    z = '2007-03-05 08:02:37'
How can I get answer
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
2012 Jul 05
3
Histogram
I have a column of 1000 datapoints from the normal distribution with mean 2
and variance 4. How can I get a histogram of these observations with 20
bins with each bin having 50 observations?
-- 
Thanks,
Jim.
	[[alternative HTML version deleted]]