install.packages("remotes")
-remotes::install_github("datashield/dsBase", "<BRANCH>")
+remotes::install_github("datashield/dsBase", "<BRANCH>")# Install v6.3.4 with the following
-remotes::install_github("datashield/dsBase", "6.3.4")
Takes an object that is either a data-frame column or a vector, and can do extraction of
+components of full date (extractdate), can combine date components to a full date (makedate),
+or can calculate the time between two dates (timebetween).
+
+
+
+
dateDS(x =NULL, type =NULL, newobj =NULL, unit =NULL, add.column =NULL)
+
+
+
+
Arguments
+
+
+
x
+
Character vector specifying the server-side object(s). For data-frame columns, use the format df$column.
+
+
+
type
+
Character string specifying the operation: "extractdate", "makedate", or "timebetween".
+
+
+
newobj
+
Character string for the name of the object that will be created on the server. Default is "date.result".
+
+
+
unit
+
Character string specifying the unit for extractdate or timebetween: "days", "months", or "years".
+
+
+
add.column
+
Logical. If FALSE, the result is created as a new server-side object;
+if TRUE, the result is added as a new column in the existing data-frame. Default is FALSE.
+
+
+
+
Value
+
the created numeric vector or date object, or the updated dataframe with the added column
+
+
+
Details
+
If the input is a data-frame column, it must be provided in the x argument as data-frame$column.
+Inputs for extractdate and timebetween must be date objects.
+For makedate, three numeric vectors (year, month, day) must be provided in the correct order.
+The add.column argument determines whether the result is added as a new column in the existing
+data-frame (TRUE), or created as a new server-side object (FALSE).
+Note: add.column = TRUE is only valid for data-frame inputs.
+
+
+
Author
+
Zulal Bekerecioglu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/reference/dsBase-package.html b/docs/reference/dsBase-package.html
new file mode 100644
index 00000000..e17af507
--- /dev/null
+++ b/docs/reference/dsBase-package.html
@@ -0,0 +1,88 @@
+
+dsBase: 'DataSHIELD' Server Side Base Functions — dsBase-package • dsBase
+
+
+
Base 'DataSHIELD' functions for the server side. 'DataSHIELD' is a software package which allows you to do non-disclosive federated analysis on sensitive data. 'DataSHIELD' analytic functions have been designed to only share non disclosive summary statistics, with built in automated output checking based on statistical disclosure control. With data sites setting the threshold values for the automated output checks. For more details, see 'citation("dsBase")'.
A character string specifying the name of the new dataset to be used for predictions.
+
+
+
traindataname
+
A character string specifying the name of the dataset used for model training.
+
+
+
type
+
A character string specifying the type of prediction. Options are "response" or "link".
+
+
+
na.action
+
A character string to specify the action to take if missing values are present. Default is "na.pass".
+
+
+
+
Value
+
a numeric vector containing the predicted values
+
+
+
Details
+
This function uses the components supplied by the client-side function (coefficients, family, formula,
+and any categorical variables) to generate predictions on the server. To use the base R predict() function,
+a "dummy" glm object is created using the same model formula, family, and link function as the original model.
+The dummy model's coefficients are then replaced with the client-side coefficient estimates.
+
To avoid mismatches between the factors used in the original glm and those in the dummy glm, the categorical
+variables saved by the client-side function are applied to the newdata.
+
For intercept-only models, the function simply returns a vector of predicted values equal to the model intercept, with the appropriate length
+based on the row length of newdataname.
Generates objects from a server-side object, which can be either a vector or
+a data-frame column. Supports five operations:
+1. (round)
+2. (ceiling)
+3. (floor)
+4. (trunc)
+5. (signif)
+where each function in baseR is applied on the server side to the specified object.
+
+
+
+
roundDS(x, type, digits, add.column, newobj)
+
+
+
+
Arguments
+
+
+
x
+
Character vector specifying the server-side object(s). For data-frame columns, use the format df$column.
+
+
+
type
+
Character string specifying the operation: "round", "ceiling", "floor",
+trunc, or "signif".
+
+
+
digits
+
Number of digits to be used in arguments "round" and "signif".
+
+
+
add.column
+
Logical. If FALSE, the result is created as a new server-side object;
+if TRUE, the result is added as a new column in the existing data-frame. Default is FALSE.
+
+
+
newobj
+
Character string for the name of the object that will be created on the server. Default is "rounding.result".
+
+
+
+
Value
+
the created numeric vector or the updated dataframe with the added column
+
+
+
Details
+
Note: add.column = TRUE is only valid for data-frame inputs.
Generates scaled objects using a server-side object, which can be either a vector or
+a data-frame column.
+
+
+
+
scaleDS(x =NULL, newobj =NULL, add.column =NULL)
+
+
+
+
Arguments
+
+
+
x
+
Character string specifying the server-side vector For data-frame columns, use the format df$column.
+
+
+
newobj
+
Character string for the name of the object that will be created on the server. Default is "scaled.data".
+
+
+
add.column
+
Logical. If FALSE, the result is created as a new server-side object;
+if TRUE, the result is added as a new column in the existing data-frame. Default is FALSE.
+
+
+
+
Value
+
the created numeric vector or the updated dataframe with the added column
+
+
+
Details
+
Note: add.column = TRUE is only valid for data-frame inputs.