search for: date_

Displaying 10 results from an estimated 10 matches for "date_".

Did you mean: date
2006 Jan 27
1
"Conditional" match?
...e two datasets, big and small. s_date<-c(?2005-12-02?, ?2005-12-01?, ?2004-11-02?,?2002-10-05?,?2000-12-15?) s_id<-c(?a?,?a?,?b?,?c?,?d?) b_date<- c(?2005-12-31?, ?2005-12-31?, ?2004-12-31?,?2002-10-05?,?2001-10-31?,?1999-12-31?) b_id<-c(?a?,?b?,?c?,?d?,?e?,?c?) small<-data.frame(date_=as.Date(s_date),id=s_id) big<-data.frame(date_=as.Date(b_date),id=b_id) For each row in ?big?, I want to look for a match in small where two conditions are met: a. big$id=small$id b. big$date_>=small$date If match is found, I wish to return the value of the date. If no match is found, I...
2010 Jun 09
3
Extracting Elements By Date
Dear R Gurus, Thanks for any help in advance! Date.frame: Returns.names X id ticker date_ adjClose totret RankStk 258060 258060 13645T10 CP 2001-06-29 18.125 1877.758 My data frame is in the above format. I would like to filter by period, per id (every 125 days) each consisting of 250 days, I.e. 1-250, 126-375, etc. One important thing to note is that not all ID's hav...
2006 Jan 03
2
For loop gets exponentially slower as dataset gets larger...
I am running R 2.1.1 in a Microsoft Windows XP environment. I have a matrix with three vectors (“columns”) and ~2 million “rows”. The three vectors are date_, id, and price. The data is ordered (sorted) by code and date_. (The matrix contains daily prices for several thousand stocks, and has ~2 million “rows”. If a stock did not trade on a particular date, its price is set to “NA”) I wish to add a fourth vector that is “next_price”. (“Next...
2005 Oct 11
6
adding 1 month to a date
Within an R dataset, I have a date field called “date_”. (The dates are in the format “YYYY-MM-DD”, e.g. “1995-12-01”.) How can I add or subtract “1 month” from this date, to get “1996-01-01” or “ “1995-11-01”. --------------------------------- [[alternative HTML version deleted]]
2010 Jun 07
3
Subsetting subsets of data.frames
...p; "date" For some reason, oftentimes there are duplicates of data with the same date. I would like to remove the duplicates per different id (removing duplicate dates for the entire data.frame would leave nothing since different id's all have the same dates) subset(x,!duplicated(x$date_)) works for just one ID, but i am having trouble figuring out how to apply this to each subset of IDs (and retaining the original data.frame structure) -- View this message in context: http://r.789695.n4.nabble.com/Subsetting-subsets-of-data-frames-tp2245556p2245556.html Sent from the R help mail...
2012 Nov 28
2
data frame: adding columns from data and file title
Data processing? I have a large number of csv files from animal tracks that look like this: Date_ Time_ Speed Course Type_ Distance 30/03/2012 11:15:05 108 121 -2...
2006 Jan 13
0
Controller part of in-place editing
...;' + link.id.to_s) %> <td> <div id="<%= ''user_'' + link.id.to_s -%>"><%= link.user %></div></td> <%= in_place_editor (''user_'' + link.id.to_s) %> <td> <div id="<%= ''date_'' + link.id.to_s -%>"><%= link.date %></div></td> <%= in_place_editor (''date_'' + link.id.to_s) %> <td> <div id="<%= ''updated_'' + link.id.to_s -%>"><%= link.updated %></div...
2010 Jun 08
1
Filtering out a data.frame
Sample Data.Frame format Name is Returns.nodup X id ticker date_ adjClose totret RankStk 427225 427225 00174410 AHS 2001-11-13 21.66 100 1235 "id" uniquely defines a row What I am trying to do is filter out id's that have less than 1500 data points (by date) First, I used total<-by(Returns.nodup, Returns.nodup$id,nrow) which s...
2010 Jun 04
5
R Newbie, please help!
...here are about 150 different IDs & the dataset spans 3 million rows. The main columns of concern are ID, date, and totret. What I need to do is to derive daily returns for each ID from totret, which is simply totret at time t+1 divided by totret at time t. X id ticker date_ adjClose totret RankStk 427225 427225 00174410 AHS 2001-11-13 21.66 100.00000 1235 441910 441910 00174410 AHS 2001-11-14 21.60 99.72300 1235 458458 458458 00174410 AHS 2001-11-15 21.65 99.95380 1235 284003 284003 00174410 AHS 2001-11-16 21.59 99.67680...
2007 May 03
1
reshape question
Hello all, A quick question concerning a behavior of reshape I fail tu understand, probably something obvious but I just can't see it. With the following data frame further referred to as tab : Variete;Semis.Date;Date_Mesure.1;Variable_Mesure.1;Valeur_Mesure.1;Date_Mesure.2;Variable_Mesure.2;Valeur_Mesure.2;Date_Mesure.3;Variable_Mesure.3;Valeur_Mesure.3;Date_Mesure.4;Variable_Mesure.4;Valeur_Mesure.4;Date_Mesure.5;Variable_Mesure.5;Valeur_Mesure.5;Date_Mesure.6;Variable_Mesure.6;Valeur_Mesure.6;Date_Mesure.7;Var...