search for: junk_

Displaying 3 results from an estimated 3 matches for "junk_".

Did you mean: junk
2010 Jan 21
0
unexpected behaviour of R-2.10.1 regular expression in UTF-8 locale
...ave encountered the following unexpected behaviour of R-2.10.1, but not R-2.9.0, on both RHEL 4 and Ubuntu Karmic (precompiled via synaptic or built from source). I have a character vector from which I want to extract a certain pattern that is surrounded by junk as in: > nn <- sprintf("junk_%02d_junk", 1:2) > nn [1] "junk_01_junk" "junk_02_junk" > sub("^.*([[:digit:]]{2}).*$", "\\1", nn) [1] "nk" "nk" # oops? however: > sub("^.*([[:digit:]]{2}).*$", "\\1", nn, perl = TRUE) [1] "01"...
2008 Jun 05
7
Improving data processing efficiency
Hi everyone! I have a question about data processing efficiency. My data are as follows: I have a data set on quarterly institutional ownership of equities; some of them have had recent IPOs, some have not (I have a binary flag set). The total dataset size is 700k+ rows. My goal is this: For every quarter since issue for each IPO, I need to find a "matched" firm in the same
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.