Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8978557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:38:34+00:00 2026-06-15T19:38:34+00:00

res_log <- lapply(res, log2) res is a list and each element is a MATRIX

  • 0
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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:38:35+00:00Added an answer on June 15, 2026 at 7:38 pm

    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:

    lapply(res, log2)
    

    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:

    res <- rep(list(matrix(1:9, 3)), 2)
    
    # [[1]]
    #      [,1] [,2] [,3]
    # [1,]    1    4    7
    # [2,]    2    5    8
    # [3,]    3    6    9
    # 
    # [[2]]
    #       [,1] [,2] [,3]
    # [1,]    1    4    7
    # [2,]    2    5    8
    # [3,]    3    6    9
    
    
    lapply(res, log2)
    
    # [[1]]
    #          [,1]     [,2]     [,3]
    # [1,] 0.000000 2.000000 2.807355
    # [2,] 1.000000 2.321928 3.000000
    # [3,] 1.584963 2.584963 3.169925
    # 
    # [[2]]
    #          [,1]     [,2]     [,3]
    # [1,] 0.000000 2.000000 2.807355
    # [2,] 1.000000 2.321928 3.000000
    # [3,] 1.584963 2.584963 3.169925
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

var express = require('express'); var app = express(); app.get('/files/:service/:op/:file', function(req, res){ console.log(req.params.file) }) app.listen(3000);
There is some code: app.get(/^\/test\?sid$/, function (req, res) { console.log('sid: ', req.params[0]); res.sendfile(__dirname +
Can not parse json using this var res = eval('(' + response + ')');
I have code like common.findOne('list', {'listId': parseInt(request.params. istId)}, function(err, result){ if(err) { console.log(err); }
Checking the simple code var http = require('http'); var server = http.createServer(function(req, res){ console.log(Got
In official doc , there is some sample code: var req = http.request(options, function(res)
I would like to do something like: app.On_All_Incoming_Request(function(req, res){ console.log('request received from a client.');
I'm getting the error: Element extends past end of object in this route. I
I got this error while trying to get facebook access_token from node.js server: {error:{message:(#803)
std::cmatch res; std::string str = <h2>I'm a piece of text</h2>; std::regex rx(<h(.)>([^<]+)); std::regex_search(str.c_str(), res,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.