search for: patient_id

Displaying 17 results from an estimated 17 matches for "patient_id".

2013 Apr 12
5
how to change the date into an interval of date?
Hi, I am not sure I understand your question correctly. dat1<- read.table(text=" id??????????? responsed_at???????????????? number_of_connection????????????????? scores 1????????????????? 12-01-2010?????????????????????????????????? 1????????????????????????????????????????????? 2 1????????????????? 15-02-2010??????????????????????????????????
2013 May 22
0
calcul of the mean in a period of time
Hi, I guess you meant this: dat2<- read.table(text=" patient_id????? t???????? scores 1????????????????????? 0??????????????? 1.6 1????????????????????? 1??????????????? 2.6 1????????????????????? 2???????????????? 2.2 1????????????????????? 3???????????????? 1.8 2????????????????????? 0????????????????? 2.3 2?????????????????????? 2???????????????? 2.5 2??????...
2013 May 07
4
how to calculate the mean in a period of time?
Hi, Your question is still not clear. May be this helps: dat2<- read.table(text=" patient_id????? t???????? scores 1????????????????????? 0??????????????? 1.6 1????????????????????? 1??????????????? 2.6 1????????????????????? 2???????????????? 2.2 1????????????????????? 3???????????????? 1.8 2????????????????????? 0????????????????? 2.3 2?????????????????????? 2???????????????? 2.5 2??????...
2010 Sep 07
2
Plotting longitudinal data
...0 4799 3333330003 0.9000 20.03.07 13 2401 3333330003 0.9300 27.03.06 16 3 3333330003 0.8400 10.02.05 NULL 7233 3333330003 NULL 14.05.09 1 4 3333330004 0.7200 10.02.05 NULL 4800 3333330004 0.8900 19.03.07 22 2402 3333330004 0.7300 29.03.06 27 7258 3333330004 0.7700 18.05.09 1 The second column is a patient_id, the third is the value I want to plot against the fourth which is the date. First I 'aggregate' the patient_ids: id<-unique(dat$patient_id) Then I try (and fail) to create a loop, that is supposed to plot the data: for(i in 1:8480){patient_id==id[i]plot(date,value)} What might b...
2010 Jun 29
3
merging/intersecting 2 data frames
Dear R People: I have two data frames, a.df and b.df as seen here: > a.df[1:10,] DATE GENDER PATIENT_ID AGE SYNDROME 1 4/16/2009 F 23686 45 RASH ON BODY 2 4/16/2009 F 13840 35 CANT URINATE 3 4/16/2009 M 12895 30 BLURRED VISION 4 4/16/2009 M 18375 33 UNABLE TO VOID 5 4/16/2009 M 2237 44 SOB WEA...
2013 Jun 04
0
choose the lines2
HI, You can do this: dat1<- read.csv("dat7.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t") dat.bru<- dat1[!is.na(dat1$evnmt_brutal),] fun2<- function(dat){? ????? lst1<- split(dat,dat$patient_id) ??? lst2<- lapply(lst1,function(x) x[cumsum(x$evnmt_brutal==0)>0,]) ??? lst3<- lapply(lst2,function(x) x[!(all(x$evnmt_brutal==1)|all(x$evnmt_brutal==0)),]) ??? lst4<- lst3[lapply(lst3,nrow)!=0] ??? lst5<- lapply(seq_along(lst4),function(i){ ???????????????????? do.call(rbind,lapply...
2010 Nov 02
2
multi-level cox ph with time-dependent covariates
...ssues in the same days, until a certain outcome was reached (or outcome censored). Suppose that the pathogen can vary over time (might be a bacteria that selects for drug-resistance) and that also it can vary across different tissue reservoirs within the same patient. In other words: names(data) = patient_id, start_time, stop_time, tissue_id, pathogen_type, marker1, ..., marker100, ..., outcome If I had multiple observations per patient at different time intervals, I would model it like this (hope it is correct) model<-coxph(Surv(start_time,stop_time,outcome)~all_covariates+cluster(patient_id)) B...
2007 Feb 20
1
Reshape (pivot) question
Hi R-users, I have a data set like this (first ten rows): id patient_id date code class eala ID1564262 1562 6.4.2006 12:00 5555 1 NA ID1564262 1562 6.4.2006 12:00 5555 1 NA ID1564264 1365 14.2.2006 14:35 5555 1 50 ID1564265 1342 7.4.2006 14:30 2222 2 50 ID1564266 1648 7.4.200614:30 2222 2 50 ID1564267 1263 10.2.2006 15:45 2222 2 10 ID1564267 1263 10.2.200615:45 3333 3...
2013 Jun 04
0
choose the lines2
Hi, May be this helps: dat1<- read.csv("dat7.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t") dat.bru<- dat1[!is.na(dat1$evnmt_brutal),] fun2<- function(dat){?? ????? lst1<- split(dat,dat$patient_id) ??? lst2<- lapply(lst1,function(x) x[cumsum(x$evnmt_brutal==0)>0,]) ??? lst3<- lapply(lst2,function(x) x[!(all(x$evnmt_brutal==1)|all(x$evnmt_brutal==0)),]) ??? lst4<- lst3[lapply(lst3,nrow)!=0] ??? lst5<- lapply(seq_along(lst4),function(i){ ??? ??? ??? ??? ???? do.call(rbind,lapply...
2007 Jun 26
1
A really simple data manipulation example
In response to those who asked for a better explanation of what the Vilno software does, here's a simple example that gives some idea of what it does. LABRESULTS is a dataset with multiple rows per patient , with lab sodium measurements. It has columns: PATIENT_ID, VISIT_NUM, and SODIUM. DEMO is a dataset with one row per patient, with demographic data. It has columns: PATIENT_ID, GENDER. Here's a simple example, the following paragraph of code is a data processing function (dpf) : inlist LABRESULTS DEMO ; mergeby PATIENT_ID ; if (SODIUM == -9) SODIU...
2006 Aug 17
1
How to sort child table on fields in the associated parent
For an Xray file system patients have folders and folders have studies. That is: patients folders studies id id id name patient_id folder_id ... label type ... ... The list of studies with their associated folder and patient might look like this: name folder_label study_type Brown,Sam brsa1 CXR Jones,Gary jg99999 CXR Jones,Gary j...
2010 Jan 21
2
will_paginate ?
...page => params [ :page ], :per_page => 3 end respond_to do |format| format.html # search.html.erb format.xml { render :xml => @notes } end end notes/index.html.erb ... <% if @notes.length > 1 %> <% form_tag :action => ''search'', :patient_id => @patient.id, :method => ''get'' do %> <%= text_field_tag :query, nil, :size => 20 %> <%= submit_tag "Search" %> <% end %> <% end %> notes/search.html.erb ... <ul> <% @notes.each do |note| %> <li><%= link_to...
2013 May 27
0
choose the lines
Hi, Try this: dat1<- read.csv("dat7.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t") dat.bru<- dat1[!is.na(dat1$evnmt_brutal),] fun1<- function(dat){??? ? ??? lst1<- split(dat,dat$patient_id) ??? lst2<- lapply(lst1,function(x) x[cumsum(x$evnmt_brutal==0)>0,]) ??? lst3<- lapply(lst2,function(x) x[!(all(x$evnmt_brutal==1)|all(x$evnmt_brutal==0)),]) ??? lst4<-lapply(lst3,function(x) {vect.brutal=c() ??? ??? ??? ??? for(line in which(x$evnmt_brutal==1)){ ??? ??? ??? ??? ?? if(x...
2007 Sep 13
2
beginner's questions ... sorry
...ata.frame and figured out I can only copy and past 1 cell at a time ... but I had 4991 cells so ... In addition, I could not find a way to close the editing session while preserving the changes in the data.frame. So I generated a vector with 4991 elements, all recording the same patient-ID call is patient_ID. Then I used *cbind(patient.data.frame, patient_ID)* to generate a new.patient.data.frame made up of 8 columns, the last added one recording the patient's ID. I have no doubt R experienced users would accomplish the same task in a couple of strokes .... HOW ???? Another question is: how can...
2006 Jul 13
5
how to get to the parent of a child object.
Hi, i have a problem with the following: I have an application with patients <-->>consults models are ok in the view list_consults i do this: for consult in @consults%> <tr> <td><%= consult.patient.name %></td> <td><%= consult.reason %></td> <td><%= consult.date %></td> <td><%= link_to
2006 Oct 17
2
RODBC and NULL values
...hannel, "select calc_survival_unilateral_support as unlateral, calc_survival_bilateral_support as bilateral, calc_survival_wheelchair as wheelchair,calc_survival_death as death, calc_follow_up as followup, has_family_history_ataxia as familial from clinical, patient where clinical.patient_fk = patient_id and excluded=0 and calc_walking_disability_valid=1") > disease # and show results 127 3 3 18 0 27 1 128 0 0 0 0 13 1 129 1 5 0 0 10 0 130 10 13 1...
2006 Jun 13
7
model validation across multiple views
I have a rather complex object with a number of attributes. For a variety of reasons, I would like one view to create the object with only a couple of fields completed, then a second and third view to finish all the fields. I would like the model to validate_presence_of all these fields, since eventually I need them all there, and I would like each page to validate its portion of the fields that