Dear Rolf and Adams,
Thanks for your help! works perfectly.though all columns are of the same type,
for "safe", it is changed from data.frame to data.matrix as follows:
dmatrix <- data.matrix(dailyrecord[c("a", "e", "f")])
colnames(dmatrix) <- c("x5", "x6", "x7")
apply(dmatrix, 1, function(row) fu
Hello, R-experts,
In R-program, I have a question about the apply-family.
I want to use apply-family to replace a for-loop in my R-code,But, lapply
returns a list of 3 (each component is the same), sapply returns a matrix, and
mapply with error message.
how to use apply-family function so that
2 matches
Mail list logo