Step1: Modify the functions, ect...(Ctrl+Shift+Alt+R can be used to generate a templet for the description of the functions)
Step2: Generate the needed documents (such as DESCRIPTION, NAMESPACE) by "devtools::document()".
Setp3: Build the package by "Ctrl + Shift + B".
Step4: Update the online package by using GitHub Desktop.
library(knitr)
library(devtools)
library(roxygen2)
library(testthat)
devtools::install_github("littlebeannie/demo")
library(survival)
attach(veteran)
km_plot(Surv(time, status),covariate=trt,dataset = veteran,plot_fancy = T)
km_plot_fancy( survfit(Surv(time, status)~ sex, data=lung),
pvalue.TF = TRUE,
conf.int.TF = TRUE,
x.lab = "Time in Days",
x.interval = 200,
risk.table.style = "absolute",
n.censor.plot.TF= FALSE,
surv.median.line.style = "hv",
legend = c("group 1", "group 2"))
log_rank_test(Surv(time, status),covariate = trt,dataset=veteran)
cox_reg(Surv(time, status),covariate = trt,dataset=veteran)
curve_predict(Surv(time, status),covariate = trt,dataset=veteran,family="exp",futuretime=3)
multi_test_recy_pvalue(Surv(time, status),trt,veteran,
Surv(time, status),trt,veteran,
Surv(time, status),prior,veteran,
Surv(time, status),trt,veteran,
Surv(time, status),trt,veteran,
Surv(time, status),prior,veteran,
ratio.compare1 = c(3,3,19),
ratio.compare2 = c(3,3,19),
two.side=TRUE)
forest_plot(Surv(time,status)~trt + celltype + karno +diagtime + age +prior, dataset = veteran)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.