1- # '
2- # ' @title asDataMatrixDS a serverside assign function called by ds.asDataMatrix
1+ # ' @title asDataFrameDS a serverside assign function called by ds.asDataFrame
32# ' @description Coerces an R object into a matrix maintaining original
43# ' class for all columns in data.frames.
5- # ' @details This assign function is based on the native R function \code{data.matrix}
6- # ' If applied to a data.frame, the native R function \code{as.matrix}
7- # ' coverts all columns into character class. In contrast, if applied to
8- # ' a data.frame the native R function \code{data.matrix} converts
9- # ' the data.frame to a matrix but maintains all data columns in their
10- # ' original class
4+ # ' @details This assign function is based on the native R function \code{data.frame}
115# ' @param x.name the name of the input object to be coerced to class
12- # ' data.matrix . Must be specified in inverted commas. But this argument is
6+ # ' data.frame . Must be specified in inverted commas. But this argument is
137# ' usually specified directly by <x.name> argument of the clientside function
14- # ' \code{ds.asDataMatrix }
8+ # ' \code{ds.asDataFrame }
159# ' @return the object specified by the <newobj> argument (or its default name
16- # ' "asdatamatrix .newobj") which is written to the serverside. For further
10+ # ' "asdataframe .newobj") which is written to the serverside. For further
1711# ' details see help on the clientside function \code{ds.asDataMatrix}
18- # ' @author Paul Burton for DataSHIELD Development Team
12+ # ' @author Tim Cadman
1913# ' @export
20- # '
21- asDataMatrixDS <- function (x.name ){
14+ asDataFrameDS <- function (x.name ){
2215
2316if (is.character(x.name )){
2417 x <- eval(parse(text = x.name ), envir = parent.frame())
@@ -28,9 +21,9 @@ if(is.character(x.name)){
2821 stop(studysideMessage , call. = FALSE )
2922 }
3023
31- output <- data.matrix (x )
24+ output <- data.frame (x )
3225
3326 return (output )
3427}
3528# ASSIGN FUNCTION
36- # asDataMatrixDS
29+ # asDataFrameDS
0 commit comments