Description Usage Arguments Value Examples
Unlike ds.colnames this function allows to set the names too
1 2 3 4 5 6 7 8 |
df |
a character, name of the dataframe |
value |
a vector containing the new column names (if null, the function simply returns the colnames) |
to.replace |
a vector containing the names of the columns to replace. It must have the same length as the value vector. If null, all column names will be replaced. |
async |
same as in datashield.assign |
wait |
same as in datashield.assign |
datasources |
same as in datashield.assign |
the column names of the dataframe
1 2 3 4 5 6 7 8 9 10 | # open a local pseudo connection:
opals <- dssCreatePseudoServers(servers = 2, tie_first_to_GlobalEnv = 1)
# load the iris dataset
datashield.aggregate(opals[1], as.symbol('partialData("iris", 1, 70)'))
datashield.aggregate(opals[2], as.symbol('partialData("iris", 71, 150)'))
dssColNames('iris')
# set them to something else:
dssColNames('iris', value = c('sl', 'sw', 'pl', 'pw', 'sp'))
#check again:
dssColNames('iris')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.