Issue with plotsurvfitDS after using ds.Surv and ds.survfit #12
-
Describe the bug To Reproduce
Generates the error:
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
can you please give some more details like what VM are you using, what data are you using and what versions of Opal and R you have? Also can you reproduce this error using synthetic data? Then I can try to reproduce this error message. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer. On the client side, we use the rocker/rstudio:4.1.2 docker image which has Ubuntu 20.04.5 LTS and R version 4.1.2.
The last line fails with the following error:
Thanks, |
Beta Was this translation helpful? Give feedback.
-
Thanks @naudinlo Could you please try this using just R and R Studio and just client-side package installations? https://opal-sandbox.mrc-epid.cam.ac.uk The following steps work for me and I can generate the survival curves.
https://github.com/neelsoumya/dsSurvival/blob/main/vignettes/simple_script.R This works with just client side installations i.e. R and R Studio
https://raw.githubusercontent.com/neelsoumya/dsSurvival/main/installer_R_Rstudio.R
R version 4.2.1 (2022-06-23) Matrix products: default locale: attached base packages: other attached packages: |
Beta Was this translation helpful? Give feedback.
-
I also tried your code and ran it on my laptop (Mac OS X) and R and R Studio (no docker image). This works fine. Here is the code below (I modified the code slightly by loading the libraries): ###################
# load libraries
###################
library(survival)
library(metafor)
library(dsSurvivalClient)
require('DSI')
require('DSOpal')
require('dsBaseClient')
builder <- DSI::newDSLoginBuilder(.silent = TRUE)
builder$append(
server = "chu",
url = "https://opal-demo.obiba.org/",
user = "administrator", password = "password",
driver = "OpalDriver",
options='list(ssl_verifyhost=0, ssl_verifypeer=0)',
profile="survival"
)
logindata <- builder$build()
connections <- DSI::datashield.login(logins = logindata)
datashield.assign.table(connections, symbol = "D", table = "SURVIVAL.EXPAND_WITH_MISSING1")
ds.asNumeric(x.name = "D$cens", newobj = "EVENT", datasources = connections)
ds.asNumeric(x.name = "D$starttime", newobj = "STARTTIME", datasources = connections)
ds.asNumeric(x.name = "D$endtime", newobj = "ENDTIME", datasources = connections)
ds.Surv(time="STARTTIME", time2="ENDTIME", event="EVENT", type="counting", objectname='surv_object')
ds.survfit(formula='surv_object~1', objectname='survfit_object')
ds.plotsurvfit(formula = 'survfit_object')
sessionInfo()
Matrix products: default locale: attached base packages: other attached packages: |
Beta Was this translation helpful? Give feedback.
-
@naudinlo @tombisho I tried all this code on my laptop on R and R Studio. I did not use the docker image. Can you please try using this setup and let me know if it works for you? i.e. do the following
install.packages('devtools')
library(devtools)
devtools::install_github('neelsoumya/dsSurvivalClient')
devtools::install_github('datashield/dsBaseClient@6.1.1')
install.packages('metafor')
install.packages('DSOpal')
install.packages('DSI')
install.packages('opalr')
install.packages('meta')
install.packages('fANCOVA')
install.packages('survival')
###################
# load libraries
###################
library(survival)
library(metafor)
library(dsSurvivalClient)
require('DSI')
require('DSOpal')
require('dsBaseClient')
builder <- DSI::newDSLoginBuilder(.silent = TRUE)
builder$append(
server = "chu",
url = "https://opal-demo.obiba.org/",
user = "administrator", password = "password",
driver = "OpalDriver",
options='list(ssl_verifyhost=0, ssl_verifypeer=0)',
profile="survival"
)
logindata <- builder$build()
connections <- DSI::datashield.login(logins = logindata)
datashield.assign.table(connections, symbol = "D", table = "SURVIVAL.EXPAND_WITH_MISSING1")
ds.asNumeric(x.name = "D$cens", newobj = "EVENT", datasources = connections)
ds.asNumeric(x.name = "D$starttime", newobj = "STARTTIME", datasources = connections)
ds.asNumeric(x.name = "D$endtime", newobj = "ENDTIME", datasources = connections)
ds.Surv(time="STARTTIME", time2="ENDTIME", event="EVENT", type="counting", objectname='surv_object')
ds.survfit(formula='surv_object~1', objectname='survfit_object')
ds.plotsurvfit(formula = 'survfit_object')
sessionInfo()
|
Beta Was this translation helpful? Give feedback.
-
@naudinlo did this code work for you? |
Beta Was this translation helpful? Give feedback.
@naudinlo @tombisho I tried all this code on my laptop on R and R Studio. I did not use the docker image. Can you please try using this setup and let me know if it works for you?
i.e. do the following
Install R and R Studio on your laptop
Install all the required packages using these commands in R or R Studio:
###…