I have a vector x,yand a data frame dfsuch that
NCOL(x) = NCOL(y) = ncol(df).
I would like to divide each column (all rows) into a vector x(this means: all values in the column are one of dfthe values of the first value in the vector x, the second column (all values) is the second column (one value) of the vector x.
The same situation for adding a vector yto columns (same).
Could you help me do this in an elegant way?
user6055028
source
share