search for: jefferyding

Displaying 5 results from an estimated 5 matches for "jefferyding".

2010 Jun 04
5
R Newbie, please help!
Hello Everyone, I just started a new job & it requires heavy use of R to analyze datasets. I have a data.table that looks like this. It is sorted by ID & Date, there 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
2010 Jun 07
3
Subsetting subsets of data.frames
Hey Everyone, I have been stumped by this all day. Basically, I have a data.frame of multiple columns. Of concern are "id" & "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
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
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 subsetted by
2010 Jun 10
3
Retrieving the 2 row of "dist" computations
Dear R Gurus, As you probably know, dist calculates the distance between every two rows of data. What I am interested in is the actual two rows that have the least distance between them, rather than the numerical value of the distance itself. For example, If the minimum distance in the following sample run is d[14], which is .3826119, and the rows are 4 & 6. I need to find a generic way to