dh.localProxy | R Documentation |
If you have a remote dataframe on the servers, it can be challenging to remember variable names when writing code. Because the dataframes are on remote servers, auto-complete won't work in RStudio. The purpose of this function is to create a local object that has the same structure as the remote data frame and enables the use of autocomplete when writing DataSHIELD code.
dh.localProxy(df = NULL, conns = NULL, checks = TRUE)
df |
Character specifying a server-side data frame. |
conns |
DataSHIELD connections object. |
checks |
Logical; if TRUE checks are performed prior to running the function. Default is TRUE. |
If you have a dataframe "D" with columns LAB_TSC, DIS_CVA and DIS_DIAB, normally you would need to write:
ds.summary("D$LAB_TSC")
with the variable name spelled correctly
(no autocomplete!) and remember quotation marks. However after running this
function you can type:
ds.summary(D$
and hit tab, and the list of variables will be displayed.
Choose one and hit enter to finish up with:
ds.summary(D$LAB_TSC)
- no quotation marks needed either!
Creates a local proxy dataframe. Stops function if df
doesn't exist
or contains variables with inconsistent class across cohorts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.