Skip to content

Commit e3e98bc

Browse files
committed
refactor colnames
1 parent 6eaba77 commit e3e98bc

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

R/colnamesDS.R

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#'
2+
#' @title Returns the column names of a data frame or matrix
3+
#' @description This function is similar to R function \code{colnames}.
4+
#' @details The function returns the column names of the input dataframe or matrix
5+
#' @param x a string character, the name of a dataframe or matrix
6+
#' @return the column names of the input object
7+
#' @author Demetris Avraam, for DataSHIELD Development Team
8+
#' @export
9+
#'
10+
colnamesDS <- function(x){
11+
x.val <- .loadServersideObject(x)
12+
.checkClass(obj = x.val, obj_name = x, permitted_classes = c("data.frame", "matrix"))
13+
out <- colnames(x.val)
14+
return(out)
15+
}
16+
#AGGREGATE FUNCTION
17+
# colnamesDS

0 commit comments

Comments
 (0)