Closed mworni closed 12 years ago
= means <- == means test if they are equal
competing_risk <- NA competing_risk[os_death==0] <- "alive" competing_risk[os_death==1] <- "dead" competing_risk[css_death==1] <- "css_dead" competing_risk <- as.factor(competing_risk) tabulate(competing_risk) class(competing_risk) CrossTable(competing_risk, css_death, missing.include=TRUE)
other suggestions from looking at the script:
On Thu, Jun 28, 2012 at 2:49 PM, mworni < reply@reply.github.com
wrote:
This is the code I used aiming to create a variable competing_risk that will be used for cancer specific survival KM plots:
competing_risk <- NA competing_risk[os_death=0] <- 0 competing_risk[os_death=1] <- 2 competing_risk[css_death=1] <- 1 competing_risk <- as.factor(competing_risk) levels(competing_risk) class(competing_risk) CrossTable(competing_risk, css_death, missing.include=TRUE)
Whenever I try to check if my variable creation worked, I get the following error message: Error in CrossTable(competing_risk, css_death, missing.include = TRUE) : x and y must have the same length
Reply to this email directly or view it on GitHub: https://github.com/rpietro/EsophagealCancerT1N0/issues/4
This is the code I used aiming to create a variable competing_risk that will be used for cancer specific survival KM plots:
competing_risk <- NA competing_risk[os_death=0] <- 0 competing_risk[os_death=1] <- 2 competing_risk[css_death=1] <- 1 competing_risk <- as.factor(competing_risk) levels(competing_risk) class(competing_risk) CrossTable(competing_risk, css_death, missing.include=TRUE)
Whenever I try to check if my variable creation worked, I get the following error message: Error in CrossTable(competing_risk, css_death, missing.include = TRUE) : x and y must have the same length