getCoxPie: Get pie plot of Cox chisq proportion for variants in Cox...

View source: R/clinic_getCoxPie.R

getCoxPieR Documentation

Get pie plot of Cox chisq proportion for variants in Cox regression model

Description

Get pie plot of Cox chisq proportion for variants in Cox regression model

Usage

getCoxPie(
  data,
  time.col = "time",
  status.col = "event",
  clusters,
  time.raw.type = c("Day", "Month", "Year")[1],
  time.target.type = c("Day", "Month", "Year")[3],
  global = T,
  pie.color,
  Others.color = mycolor[27],
  pie.label,
  dc = 1,
  legend.name = "Variable",
  legend.position = "right",
  is.title = T,
  plot.size = 7,
  names = "project"
)

Arguments

data

a data frame with survival data(time & event)

time.col

colname of time value

status.col

Numeric.status.col must be a binary parameter with 0(event not happened yet) or 1(event happened) value.

clusters

list of characters.Some of the colnames of the data representing the value involving the glm model.

time.raw.type

one of "Day","Month","Year"

time.target.type

one of "Day","Month","Year"

global

should a global chi-square test be done, in addition to the per-variable or per-term tests tests.

pie.color

a character vector with color value and variable names. Default is missing.

Others.color

the color of others. It works when global=T

dc

the digit counts of proportion

legend.name

the name of legened

legend.position

the position of legend

is.title

whether plot title

plot.size

the size of saved plots

names

part of save files or plots.

Value

pie data and plots

Author(s)

Weibin Huang<654751191@qq.com>

See Also

cox.zph; cox.ph

Examples

data("myeloma",package = "survminer");
data <- myeloma;rm(myeloma)
show.color(mycolor)
pie.color <- c(TP53="#FB8072", WHSC1="#BEBADA", DEPDC1="#80B1D3", Others="#A65628")
pie.label = c("TP53" = "tp53","WHSC1" = "whsc1","DEPDC1"="depdc1")
a <- getCoxPie(data,
               time.col = "time",
               status.col = "event",
               clusters = list(c("TP53","WHSC1"),
                               c("TP53","WHSC1","DEPDC1")),
               time.raw.type = c("Day", "Month","Year")[2],
               time.target.type = c("Day", "Month", "Year")[3],
               global=T,
               pie.color = pie.color,
               pie.label = pie.label,
               plot.size = 7,
               names = "project")

huangwb8/luckyExperiment documentation built on June 29, 2023, 10:15 a.m.