Displaying 10 results from an estimated 10 matches for "date3".
Did you mean:
date
2012 Aug 05
4
find date between two other dates
Hi,
I am trying to assign "Season" values to dates depending on when they occur.
For example, the following dates would be assigned the following "Season"
numbers based on the "season" intervals detailed below in the code:
ddate Season
29/12/1998 20:00:33 1
02/01/1999 05:20:44 2
02/01/1999 06:18:36 2
02/02/1999
2005 Feb 24
2
Row median of Date class variables in a data frame
...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, 2000, 3000,4000)
date2 <- date1 + 100
date3 <- date2 + 100
class(date1) <- class(date2) <- class(date3) <- "Date"
test <- data.frame(date1, date2, date3)
print(test)
### create a function for apply()
medDate <- function(x){
obj <- unclass(unlist(x))
med <- median(obj, na.rm = TRUE)
med
class(...
2005 Oct 04
2
Joining Dataframes
...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
site1 site2 site3
date1 5 5 5
date2 4 5 5
date3 4 5 5
species2.effort
site1 site2 site3
date1 7 8 6
date3 8 7 8
date4 8 8 8
I would like to join these into a table that looks something like this:
Effort
sp1.site1 sp1.site2 sp1.site3 sp2.site...
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
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 numeric, and
shows numbers like 16000.
i have no idea what this is and how to solve it?
henk
[[alternative HTML version deleted]]
2009 Jan 21
3
Error as.Date on Invalid Dates
...rror when the string does not represent an
actual date.
eg:
> date1 <- "2009-02-29" # Note: 2009 not a leap year
> as.Date(date1)
Error in fromchar(x) :
character string is not in a standard unambiguous format
As I have many instances of date entries like this, date1, date2, date3,
etc. , I'd like the script to error out gracefully and to be able to point
the user to which date they need to correct, rather than "Error in
fromchar(x)...", which doesn't make it obvious what they need to do to fix
the error.
Ideally I'd love to send the user a message lik...
2011 Jul 06
3
Reshape from long to wide format with date variable
...ot;)
> data1=data.frame(id,date,ref)
> data1
id date ref
1 034 1997-09-28 2
2 034 1997-10-06 2
3 016 1997-11-04 1
4 016 2000-09-27 1
5 016 2003-07-20 2
6 340 1997-11-08 1
7 340 1997-11-08 1
I would like to have it like this:
> data2
id date1 date2 date3 ref1 ref2 ref3
1 034 1997-09-28 1997-10-06 NA 2 2 NA
2 016 1997-11-04 2000-09-27 2003-07-20 1 1 2
3 340 1997-11-08 1997-11-08 NA 1 1 NA
All I tried the reshape package but ended up in multiple variables for each
of the dates and that is not what I would lik...
2009 Jan 14
2
List of Lists
Dear All;
Is it possible to create a list of lists (I am sure it is) along these
lines;
I have a dataframe data02 that holds a lot of information, and the first
column is ³date²
I have a list of dates in;
data03<-c(date1,.....,daten)
And would like to create a list;
data04 <- subset(data02, date == data03[1,])
Ie. data04 holds the data from data02 that matches a date in data03
How do
2010 Jan 16
3
Comparing dates in dataframes
I have two data frames. One (arr) has all arrivals to an airport for a
year, and the other (gw) has the dates and quarter hour of the day when
the weather is good. arr has a Date and quarter hour column.
>names(arr)
[1] "Date" "weekday" "hour" "month" "minute"
[6] "quarter" "ICAO"
2008 Aug 05
0
P values in non linear regression and singular gradients using nls
...l.com> wrote:
>>>
>>> Hi everyone,
>>>
>>> I have a data frame, with the following format:
>>>
>>> MatDate->
>>> row.names ID1 ID2 ID3
>>> 1 date1
>>> 2 date1
>>> 3 date3
>>> etc
>>>
>>> but I cannot perform a rollapply() statement on the matrix without
>>> converting the matrix into a time series.
>>> i.e. MatTs<-ts(MatDate)
>>
>> Use the start and frequency arguments. See ?ts
>>
>>>...