Hi Kai,
How about setting:
germlinepatients$DisclosureStatus <- NA
then having your three conditional statements as indices:
germlinepatients$DisclosureStatus[germlinepatients$gl_resultsdisclosed
== 1] <-"DISCLOSED"
germlinepatients$DisclosureStatus[germlinepatients$
gl_resultsdisclosed == 0] <-
This is probably far more discussion than the question warranted, but...
On Thu, Dec 3, 2009 at 11:14 PM, David Winsemius wrote:
>
> On Dec 3, 2009, at 10:52 PM, Gray Calhoun wrote:
>
>> The data import/export manual can elaborate on a lot of these; this is
>> all straightforward, although many p
On Thu, Dec 3, 2009 at 9:52 PM, John Filben wrote:
> Can R support data manipulation programming that is available in the SAS
> datastep? Specifically, can R support the following:
> - Read multiple dataset one record at a time and compare values from
> each; then base on if-then logic
On Dec 3, 2009, at 10:52 PM, Gray Calhoun wrote:
The data import/export manual can elaborate on a lot of these; this is
all straightforward, although many people would prefer to use a
relational database for some of the things you mentioned.
See Wickham's pithy response to this.
I'm not
awa
The data import/export manual can elaborate on a lot of these; this is
all straightforward, although many people would prefer to use a
relational database for some of the things you mentioned. I'm not
aware of a "goto" command in R, though (although I could be wrong).
--Gray
On Thu, Dec 3, 2009 a
Please refrain from posting HTML. The results can be incomprehensible:
On 2009.12.03 13:52:09, John Filben wrote:
> Can R support data manipulation programming that is available in the SAS
> datastep??? Specifically, can R support the following:
> -?? Read multiple dataset one rec
On Thu, Dec 3, 2009 at 3:52 PM, John Filben wrote:
> Can R support data manipulation programming that is available in the SAS
> datastep? Specifically, can R support the following:
> - Read multiple dataset one record at a time and compare values from
> each; then base on if-then logic
dles some special cases outside my small example dataset.
Thank you again!
Peter.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of bartjoosen
Sent: 6. november 2008 11:31
To: r-help@r-project.org
Subject: Re: [R] Data manipulation question
How about:
id
How about:
id <- c(rep("a",4),rep("b",2), rep("c",5), rep("d",1))
start <- c(c(0,6,17,20),c(0,1),c(0,5,10,11,50),c(0))
stop <- c(c(6,12,20,30),c(1,10),c(3,10,11,30,55),c(6))
data <- data.frame(id,start,stop)
f <- function(data){
m <- match(data$start,data$stop) + 1
if (length
On Thu, Nov 6, 2008 at 4:23 PM, Peter Jepsen <[EMAIL PROTECTED]> wrote:
>
> Here is an example:
>
> id <- c(rep("a",4),rep("b",2), rep("c",5), rep("d",1))
> start <- c(c(0,6,17,20),c(0,1),c(0,5,10,11,50),c(0))
> stop <- c(c(6,12,20,30),c(1,10),c(3,10,11,30,55),c(6))
> data <- as.data.frame(cbind(id
Michael Denslow <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Dear R users,
>
> I am a new user (probably obvious by my question) and
> have really learned a lot from reading this list.
> Thank you all very much. My main struggles with R are
> with data manipulation.
>
> So here is my
Try this:
rep(x[[1]], x[[2]])
On 27/01/2008, Michael Denslow <[EMAIL PROTECTED]> wrote:
> Dear R users,
>
> I am a new user (probably obvious by my question) and
> have really learned a lot from reading this list.
> Thank you all very much. My main struggles with R are
> with data manipulation.
Try this:
transform(d, z = y[match(x, id)])
On 10/10/07, Julien Barnier <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Suppose I have the following data.frame, with an id column and two
> variables columns :
>
> idX Y
> 0001 NA 21
> 0002 NA 13
> 0003 000145
>
13 matches
Mail list logo