Displaying 10 results from an estimated 10 matches for "pat1".
Did you mean:
pad1
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, format="%d.%...
2006 Nov 29
1
Extract some character from a character vector of length 1
the content of th character vector (of length 1) is as follows:
a <- "something2 ....pat1 name1 pat2 something2....pat1 name2
pat2....pat1 name3 pat2 "
I would like to extract the character bewteen pat1 and pat2. That's to
say, I would like to get a vecter of c("name1", "name2","name3").
What I did is use strsplit() twise. But I wonder if there...
2010 Jun 26
2
Recoding dates to session id in a longitudinal dataset
Hi,
I'm fairly new to R but I have a large dataset (300000 obs) containing
patient material. Some patients came 2-9 times during the three year
observation period. The patients are identified by a unique idnr, the
sessions can be distinguished using the session date. How can I recode the
date of the session to a session id (1-9). This would be necessary to obtain
information and do some
2009 Apr 21
3
Deleting rows or cols that do not meet cut off
How can I delete both rows and columns that do not meet a particular cut off value.
Example:
> d <- rbind(c(0, 1, 6, 4),
+ c(2, 5, 7, 5),
+ c(3, 6, 1, 6),
+ c(4, 4, 4, 4))
> f <- as.matrix(d)
> f
[,1] [,2] [,3] [,4]
[1,] 0 1 6 4
[2,] 2 5 7 5
[3,] 3 6 1 6
[4,] 4 4 4 4
I would like to delete all
2007 Jan 24
2
keep track of selected observations over time
Dear all,
Attached is a description of my data, graph and the problem which I need help with. Hope you have time to open the file and help me out.
Many thanks,
Jenny
---------------------------------
2007 Mar 06
2
how to edit my R codes into a efficient way
...y
want to write the codes into something like "macro" to save the lines
instead of repeating 10 times of similar work.
The following is part of my codes and I only extracted three lines for
each repeating section.
data.1 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat1.csv",
header = TRUE, sep = ",", quote = "",
fill = TRUE);
data.2 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat3.csv",
header = TRUE, sep = ",", quote = "",
fill = TRUE);
data.3 <- read.csv("http://pegasus.cc.ucf.edu/~...
2005 Nov 16
1
PPC package-ppc.read.raw.nobatch (PR#8316)
...ipt and so is
difficult to spot.
Many thanks
Martin
ppc.read.raw.nobatch <- function(directory, mz = NULL) {
datafiles.list <- ppc.xl.get.names.of.files(directory)
##
## First determine the dimensions of the data matrix
##
if (is.null(mz)) {
pat1 <- read.table(datafiles.list[1]) ?----- here
mz <- pat1[,1]
}
xtr <- matrix(NA, nrow=length(mz), ncol=length(datafiles.list))
##
## Now read in all the data
##
for (j in 1:length(datafiles.list)) {
if (ppc.options$debug) print(paste("Reading file&...
2006 Aug 15
0
Help with workaround for: Function '`[`' is not in thederivatives table
...e either identifiers (not using two successive
underscores in their names) or numbers. If they are not, you need to
get even craftier.
> Ex1 <- D(Ex, "A__2")
> Ex1
A__1 * (exp(A__2 * X) * X)
> Ex1s <- deparse(Ex1)
> Ex1s
[1] "A__1 * (exp(A__2 * X) * X)"
> pat1 <- paste(Ident, "__", Subsc, sep = "")
> rep1 <- "\\1\\[\\2\\]"
> Ex1ss <- gsub(pat1, rep1, Ex1s)
> Ex1ss
[1] "A[1] * (exp(A[2] * X) * X)"
> Ex2 <- parse(text = Ex1ss)[[1]]
> Ex2
A[1] * (exp(A[2] * X) * X)
Which is the required res...
2010 Mar 29
1
how to prove that the factor makes no difference
Dear R-helper,
Please suggest some methods for my question below.
We measured the amount of protein A in patient blood in pre-treatment and
post-treatment condition from 32 patients.
--------------------------------------------
Pre-treatment Post-treatment
Pat1 25 28
Pat2 19 15
Pat3 94 89
...
Pat32 49 23
------------------------------------------------
How can we prove that the treatment did not make any difference in the
amount of...
2009 Dec 03
3
Three-dimensional (3D) movement using 'R'
Hi Everyone,
I have a question regarding the construction of 3D graphs in 'R', BUT
these graphs also need to illustrate movement (with time) of the
prostate gland (using radiological techniques). I am not sure how to do
this in 'R' although I'm sure there is some way of doing it.
Below, I have copied and pasted some of the data with which I'm working
on. The data