res_log <- lapply(res, log2)
res is a list and each element is a MATRIX. I get the error.
Error in match.fun(FUN) : '1' is not a function, character or symbol
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to calculate the base-2 logarithm of all values of the matrices in the list
res, you can use the following command:The command
apply(res, 1, log2)will not work since a list has no rows. This can only be used with a single matrix object (or an array).An example: