search for: patid

Displaying 9 results from an estimated 9 matches for "patid".

Did you mean: paid
2006 Mar 25
7
Regexp subexpression
..., but only if they are in sequence. Do I really have to use the sub twice, first extracting the first variable, then the second? The third example should return nothing, because it's inverted, but it returns the whole string. I know I could check that separately, but is there no better way? patid=c("ALAN334","AzD44","44AZD") txt =sub("([[:alpha:]]+)([[:digit:]])+","\\1",patid) num =sub("([[:alpha:]]+)([[:digit:]])+","\\2",patid) It would be nice if the following data frame would be returned: txt num ALAN 334...
2005 May 18
1
from list to dataframe
I was wondering if someone can help me figure out the following: I have two patient datasets, ds1 and ds2. ds1 has fields "patid", "date", and "lab1". ds2 has "patid", "date", and "lab2". I want to find all the patids that have at least 2 dated records for each lab. I started by splitting each dataset by patid, to create ds1.list and ds2.list. Then I did some pro...
2012 Nov 17
3
manipulating longitudinal data in r
Dear list member, I have the following data example ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2)) I want to add another variable b, such that the max of 'a' by id is returned i.e data ke becomes ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2),b=c(2,2,2,1,2,2)) Any help will be appreciated. Oluwakemi [[alternative HTML version deleted]]
2003 May 14
2
number of patients in a hospital on a given date
Dear R-users! I am using R 1.7.0, under Windows XP. Having some hospital discharge data (admission date and discharge date for each patient), I want to get the number of patients in the hospital on a given date. My data look like (simple example): > x <- data.frame(patid=c("pat1", "pat2"), adm.date = c("15.03.2002", "16.03.2002"), dis.date=c("18.03.2002", "17.03.2002")) I can easily do a date-time conversion from the character objects: > x[,2:3] <- apply(x[,2:3], MARGIN=2, FUN=strptime, form...
2004 Sep 22
1
impenetrable warning
Dear R-help, Can anyone explain the meaning of the warning, Singular precision matrix in level -1, block 1 ? Or how to track down where it comes from? More precisely, using the nlme package, I'm issued with the warning itt2 <- lme(lrna~rx.nrti+lbrna, random=~1|patid, cor=corExp(form=~days|patid,nugget=T), weights=varPower( form=~lbrna),data=rna3) Warning messages: 1: Singular precision matrix in level -1, block 1 2: Singular precision matrix in level -1, block 1 the output is: Linear mixed-effects model fit by REML Data: rna3 Log-restricted-likelihood: -...
2005 May 24
3
obtaining first and last record for rows with same identifier
I have a dataframe that contains fields such as patid, labdate, labvalue. The same patid may show up in multiple rows because of lab measurements on multiple days. Is there a simple way to obtain just the first and last record for each patient, or do I need to write some code that performs that. Thanks, Steven
2007 Mar 27
1
basic handling of data.frame
...conditions). What I would like to do now is for example compute Cohen's Kappa (ckappa from package(psy)) for Parameter1 under special condition against no special condition. Therefore I need a table with colums: Parameter1WithSpecial, Parameter1WithoutSpecial And the data should be matched by PatID and ReaderID. How do I get this kind of table? Also how would I compute Kappa for Reader1 against Reader2? Please help me understanding how these transformations would be done in R.... Thanks, Henning
2008 Oct 31
1
subset with variable number of subset arguments
...ode == x[4]) | (set$InfCode == x[5]))) else if(6 == length(x)) return(subset(set, (set$InfCode == x[1]) | (set$InfCode == x[2]) | (set$InfCode == x[3]) | (set$InfCode == x[4]) | (set$InfCode == x[5]) | (set$InfCode == x[6]))) else stop("Too many elements in x") } set <- data.frame(PatId = c(1:100), InfCode = rep(c(1:20), 5)) GetInfCodeSubset(set, c(1,3,9)) --
2000 Feb 21
0
Kernel Error due to long filenames??
...c6 c1 e6 04 03 77 08 85 c0 74 3d 90 48 89 47 04 Due to our own research in Samba-related Mail archives and FAQs, we think that the problem may have something to do with very long filenames. Most of the files on this server are named in the following scheme: "name, given name, date of birth, patid.doc" We would really appreciate any help for solving this problem because we'd like to run more Samba-machines instead of NTs in the near future. Christian Senger christian@sengernet.de -------------- next part -------------- # # Automatically generated make config: don't edit # #...