In a tutorial for the survival package there is an example of the ‘ovarian’ data set. It should be loaded with data(ovarian) but it returns
Warning message:
In data(ovarian): data set ‘ovarian’ not found
according to Missing "ovarian" dataset in "survival" package I learned the data is there but under a different name. Based on Get a list of the data sets in a particular package I listed the data sets:
> data(package = "survival")$results[, "Item"]
[1] "aml (cancer)" "bladder (cancer)" "bladder1 (cancer)" "bladder2 (cancer)" "cancer"
[6] "capacitor (reliability)" "cgd" "cgd0 (cgd)" "colon (cancer)" "cracks (reliability)"
[11] "diabetic" "flchain" "gbsg (cancer)" "genfan (reliability)" "heart"
[16] "hoel (cancer)" "ifluid (reliability)" "imotor (reliability)" "jasa (heart)" "jasa1 (heart)"
[21] "kidney (cancer)" "leukemia (cancer)" "logan" "lung (cancer)" "mgus (cancer)"
[26] "mgus1 (cancer)" "mgus2 (cancer)" "myeloid (cancer)" "myeloma (cancer)" "nafld1 (nafld)"
[31] "nafld2 (nafld)" "nafld3 (nafld)" "nwtco" "ovarian (cancer)" "pbc"
[36] "pbcseq (pbc)" "rats (cancer)" "rats2 (cancer)" "retinopathy" "rhDNase"
[41] "rotterdam (cancer)" "solder" "stanford2 (heart)" "survexp.mn (survexp)" "survexp.us (survexp)"
[46] "survexp.usr (survexp)" "tobin" "transplant" "turbine (reliability)" "udca"
[51] "udca1 (udca)" "udca2 (udca)" "uspop2 (survexp)" "valveSeat (reliability)" "veteran (cancer)"
and found it [34] but I can’t find how to load only this one. Can anyone help?
data(ovarian (cancer)), data("ovarian (cancer)"), data(package = "survival")[34] , data(list = "ovarian (cancer)", package = "survival") do not work.
>Solution :
you can use:
df <- survival::ovarian