Displaying 20 results from an estimated 7000 matches similar to: "find date between two other dates"
2024 Jun 09
2
Format
HI all,
My
I am trying to convert character date (mm/dd/yy) to YYYY-mm-dd date
format in one of the columns of my data file.
The first few lines of the data file looks like as follow
head(Atest,10);dim(Atest)
ddate
1 19/08/21
2 30/04/18
3 28/08/21
4 11/10/21
5 07/09/21
6 15/08/21
7 03/09/21
8 23/07/18
9 17/08/20
10 23/09/20
[1] 1270076 1
I am using the following
2005 Feb 24
2
Row median of Date class variables in a data frame
I am trying to calculate the median of each row of a
data frame where the data frame consist of
columns of class Date.
Below are my test data and best attempt at using apply.
I didn't see a solution via Google or the Baron search
site.
I'd be grateful for any suggestions or solutions.
I'm using R 2.0.0 on Mac OS X.
Thank you,
Stephen Weigand
### Test data
date1 <- c(1000,
2024 Jun 09
1
Format
On 2024-06-09 4:39 p.m., Val wrote:
> HI all,
>
> My
> I am trying to convert character date (mm/dd/yy) to YYYY-mm-dd date
> format in one of the columns of my data file.
>
> The first few lines of the data file looks like as follow
>
> head(Atest,10);dim(Atest)
> ddate
> 1 19/08/21
> 2 30/04/18
Those aren't legal months in the first entry.
2012 Jul 06
3
Compare date Oracle with Sys.time
I would like to import only datas of my table where DATE>today-7days.
But my datas in Oracle are 'dates' and in R are 'characters'.
now_7<-format(Sys.time()-(7*60*60*24), "%Y-%m-%d 00:00:00")
How to do?
--
View this message in context: http://r.789695.n4.nabble.com/Compare-date-Oracle-with-Sys-time-tp4635624.html
Sent from the R help mailing list archive at
2005 Oct 04
2
Joining Dataframes
I am attempting to join several dataframes that summarize sampling effort
for different samples into one large data.frame/table.
I have looked at the merge command, but have not been clever enough to
figure out how to get it to do what I want.
A simplified example of what I am trying to do:
The dataframes I have look like this (they were generated using the table
command)
species1.effort
2012 Mar 07
1
date columns chooser
i have a data frame with 2 columns of dates.
with str(dataframe) i have ensured myself that they were indeed formatted
as dates.
one column has NA's in it.
the aim is now to make a third column that chooses date1 if it is a date,
and choose date2 if it is a NA.
i am trying
df$date3=ifelse(is.na(df$date1), df$date2, df$date1).
this leads to unexpected behaviour: the resulting column is
2009 Jan 21
3
Error as.Date on Invalid Dates
Hi All,
I have an script in R which accepts user inputs for certain parameters,
particularly dates, which the user inputs as character strings.
eg:
> date1 <- "2009-01-21"
The script later parses the input via the as.Date function:
> as.Date(date1)
However, as.Date encounters an error when the string does not represent an
actual date.
eg:
> date1 <-
2006 Aug 11
3
An apply and rep question
Hi list,
I'm sure the explanation must be laughably simple to the experts out
there, but I just could figure it out. I have a simple data frame that
looks like,
>head(da.off)
DDate OffP
1 2005-01-01 41.23
2 2005-01-02 44.86
3 2005-01-03 44.86
4 2005-01-04 43.01
5 2005-01-05 45.47
6 2005-01-06 48.62
where the first column DDate currently is character, and OffP is
numeric.
I want
2011 Jul 06
3
Reshape from long to wide format with date variable
Hi,
I need to reshape my dataframe from a long format to a wide format.
Unfortunately, I have a continuous date variable which gives me headaches.
Consider the following example:
> id=c("034","034","016","016","016","340","340")
> date=as.Date(c("1997-09-28", "1997-10-06", "1997-11-04",
2017 Aug 19
4
My very first loop!! I failed. May I have some start-up aid?
Dear all,
I have a data similar to this:
myframe<- data.frame (ID=c("Ernie", "Ernie","Ernie","Ernie"),
Timestamp=c("24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00",
"25.09.2012 10:00"), Longitude=c("8.481","8.482","8.483","8.481"),
2006 Dec 28
3
Dates in R
Hello all,
Can somebody point me to references or provide some code on dealing with
this date issue. Basically, I have two vectors of values that represent
dates. I want to convert these values into a date format and subtract the
differences to show elapsed time in days. More specifically, here is the
example:
Date1 Date2
032398 061585
032398 061585
111694 101994
111694
2017 Sep 12
0
show 0 at y axis in xyplot lattice
Hi Maria
Rule 1 make sure your data is in the right format
dat <- source("G:/1/savedat.txt")
> dat
$value
Location Date Zn2 upper.zn lower.zn
1 upstream 2016-04-27 29.92477 55.59800 13.912207
2 spill 2016-04-27 12.84040 22.07006 6.964934
3 downstream 2016-04-27 22.49673 41.60901 11.739109
4 upstream 2016-06-28 23.98425 45.60219 10.690640
5
2017 Sep 12
2
Σχετ: show 0 at y axis in xyplot lattice
Dear all,
Thank you very much for the help. ylim=c(-5, 80) worked.?
Regarding the reproducible example, I used dput () and saved the file as txt. It is not the first time that I used this way and normally it works. Because when I try to attach a .csv file with the data, most of the time it doesn't go through.?
I will know for the next time.?
Many thanks.
Regards,Maria
???? 2:11 ?.?.
2012 Nov 10
4
help on date dataset
Hi everybody,
I am beginer in R and I need your precious help.
I want to create a small function in R as in sas to retrieve date.
I have a file with data that import in R.
DATE PAYS nb_pays.ILI.
1 24/04/2009 usa 0
2 24/04/2009 usa 0
3 24/04/2009 Mexique 0
4 24/04/2009
2017 Sep 12
0
Σχετ: show 0 at y axis in xyplot lattice
Dear Maria
The file you attached to your first e-mail did come through but I think
some people on the list must have missed it.
Michael
On 12/09/2017 12:54, Maria Lathouri via R-help wrote:
> Dear all,
> Thank you very much for the help. ylim=c(-5, 80) worked.
> Regarding the reproducible example, I used dput () and saved the file as txt. It is not the first time that I used this way
2009 Jul 11
2
Date conversions
Hi all,
I'm having a little bit of trouble with some date conversions and
am hoping someone can help me out. Thanks in advance.
OK, I have two sources of data that provide date info in a csv file
differently. I've attached a small zipped file with two text files
that illustrate both. (Is it ok to send attachments to this list? Not
sure. It's very small.) I need to be able to
2010 Jun 14
1
recursively Merging a list a zoo objects
The zoo package as a merge function which merges a set of zoo objects
result<-merge(zoo1,zoo2,...)
Assume your zoo objects are already collected in a list
# make a phony list to illustrate the situation. ( hat tip to david W for
constructing a list in a loop)
ddat <- as.list(rep("", 20))
ytd<-seq(3,14)
for(i in 1:20) {
+ ddat[[i]] <- zoo(data,ytd )
+ }
ddat
[[1]]
1 2
2013 Feb 14
3
Problems plotting and regression w.r.t. date data type on x axis
Hello,
probably a newbie question, but i didnt find any information on
plotting/regressing w.r.t. a date data type. My trials were unfruitful. Can
anyone help ? Thanks in advance!
Here is my interaction with R:
> tabelle
date number date2
1 2009-01-1 1673 2009-01-01
2 2009-12-1 2111 2009-12-01
3 2010-7-1 2487 2010-07-01
4 2013-2-1 4301 2013-02-01
> regression.punkte<-lm(tabelle$number
2017 Aug 19
0
My very first loop!! I failed. May I have some start-up aid?
[answers inline]
On 18 August 2017 at 20:08, Dagmar <Ramgad82 at gmx.net> wrote:
>
> myframe<- data.frame (ID=c("Ernie", "Ernie","Ernie","Ernie"),
> Timestamp=c("24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00",
> "25.09.2012 10:00"),
2017 Aug 19
0
My very first loop!! I failed. May I have some start-up aid?
Thank you for providing the example code... for the request of running it
multiple times it would have helped if you could have confirmed that the
example ran through without errors... there were a lot of mistakes in it.
Look into using the reprex package to check your example next time.
I don't do this kind of analysis... I really don't know what to expect
from the functions. The