Within standard R, it is common to take objects that are lists (as a data.frame
is)
apart and apply some function and recombine them. So using my example in an
earlier
message, and hoping this text-mode message is readable, try something like this
to multiply each column of a data.frame by the
Thanks. I have a clarification and a follow-up question. I should have
asked this in the original post, and I should have provided a better
example for the FUN argument, I apologize.
For use in an example, here is a "silly" example of a function that
requires arguments such as x and y to be "separ
This looks like homework, which is not permitted on this list. But
giving you the benefit of the doubt, here are two ways to do it
> as.matrix(val_df) * matrix(rep(weights$value,5),ncol=3,byrow = TRUE)
ABC DEF ONS
[1,] 10 2 500
[2,] 20 4 500
[3,] 10 20 1000
[4,] 10 4 500
[5,]
3 matches
Mail list logo