Skip to content

Commit c901429

Browse files
committed
chore: updated CNSIM example
1 parent 1247e5a commit c901429

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

inst/examples/datashield.R

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dslite.server$profile()
1717

1818
# datashield logins and assignments
1919
data("logindata.dslite.cnsim")
20-
conns <- datashield.login(logindata.dslite.cnsim, assign=T, variables=c("GENDER","PM_BMI_CONTINUOUS"), id.name="ID")
20+
conns <- datashield.login(logindata.dslite.cnsim, assign = TRUE)
2121

2222
# List all available tables
2323
datashield.tables(conns)
@@ -28,12 +28,6 @@ datashield.resources(conns)
2828
# Check assigned variables
2929
datashield.symbols(conns)
3030

31-
# Table assignment can also happen later
32-
datashield.assign(conns, "T", "CNSIM1", variables=c("GENDER"))
33-
ds.class("T")
34-
ds.colnames("T")
35-
ds.class("T$GENDER")
36-
3731
# Execute some aggregate calls (if these methods are available in the conns)
3832
ds.class("D")
3933
ds.colnames("D")
@@ -50,7 +44,8 @@ ds.class("x")
5044
datashield.assign(conns, "xn", quote(as.numeric(x)))
5145
ds.class("xn")
5246

53-
datashield.assign(conns, "D", list(sim1="CNSIM1", sim2="CNSIM2", sim3="CNSIM3"))
47+
# Table assignment can also happen later
48+
datashield.assign.table(conns, "D", table = list(sim1="CNSIM1", sim2="CNSIM2", sim3="CNSIM3"))
5449
ds.colnames("D")
5550

5651
# Example 1: run a GLM without interaction (e.g. diabetes prediction using BMI and HDL levels and GENDER)

0 commit comments

Comments
 (0)