search for: prochi

Displaying 8 results from an estimated 8 matches for "prochi".

2010 Mar 15
1
inner join sqldf
Hi, I have two dataframes that have some common columns. I would like to join them by the common columns prochi and prescribed_date as there are duplicate prochis but they will be made unique by date. I tried doing an inner join but that just duplicated the columns whereas I would like the information from the test_sql_tsf to fill the NAs in the test_sql_psd common columns. require(sqldf) test_sql_psd &...
2010 Sep 06
3
Finding the two most recent dates
Dear R help, I have the following data frame: structure(list(prochi = c("ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1"), date_1st_event = structure(c(14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784 ),...
2010 Mar 10
2
ordering columns in a data frame
Dear R users, I have the following data frame: PROCHI date_admission 2 CAO0000713 1999-12-11 4 CAO0000713 1999-10-25 21 CAO0001743 1989-05-04 25 CAO0001743 1996-09-12 26 CAO0001743 1989-05-17 27 CAO0001743 1987-09-17 28 CAO0001743 1987-09-19 29 CAO0001743 1988-01-27 36 CAO0001747 2004-03-21 38...
2011 Mar 09
2
Cleaning date columns
Hi Everyone, I have the following problem: data <- structure(list(prochi = c("IND1", "IND1", "IND1", "IND2", "IND2", "IND2", "IND2", "IND3", "IND4", "IND5"), date_admission = structure(c(6468, 6470, 7063, 9981, 9983, 14186, 14372, 5129, 9767, 11168), class = "Date...
2010 Mar 12
7
sqldf not joining all the fields
...ws = 3864284, skip = 0, check.names = TRUE,fill=TRUE, strip.white = TRUE, blank.lines.skip = TRUE, comment.char = "#", allowEscapes = FALSE, flush = FALSE, fileEncoding = "", encoding = "unknown") x_data prochi prescribed_date dataMonth item_code res_seqno quantity directions CAO0000713 22/06/2001 NULL 842752 NULL 60 1/D CAO0000713 28/04/2000 NULL 7800 NULL 100G A/TD CAO0000713 10/04/2000 NULL 842652 NULL 60 1/D CA...
2010 Feb 23
1
Matching Problem
Hi, I have a problem with function match. I might not be using it properly? I have two character vectors that contain a unique identifier: gtype_prochi <- ("CAO1524452" "CAO0966182" "CAO9209719" "CAO4436178" "CAO3761898" "CAO3529266" "CAO2427148" "CAO8829776" "CAO2517174" "CAO5371418" "CAO1535943" "CAO1782827" "CAO5048528...
2010 Mar 03
1
Subset using partial values
Hi everyone, I would like to subset a data.frame using partial values. For example I have the following data.frame: PROCHI Main_condition 1234 411 1235 4110 1236 4111 1237 I20 1238 I201 1239 I202 Now let's say that I use the Subset function. Ordinarily I would use it as follows Subset(x, Main_condition=="411"|Main_condition=="4110" etc to get all the 411s. Is there a...
2010 Mar 04
1
Date conversion problem
Hi All, I have a character data.frame that contains character columns and date columns. I've manage to convert some of my character columns to a date format using as.Date(x, format="%m/%d/%y"). An example of one of my dates is PROCHI DtDeath icdcucd date_admission1 date_admission_2 CAO0004563 <NA> <NA> 2005-09-01 <NA> CAO0073505 <NA> <NA> 1998-03-05 <NA> CAO0079987 <NA> <NA> 2002-04-14 <NA> CAO0...