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 6701795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:58:36+00:00 2026-05-26T06:58:36+00:00

My code, which was running without problems before, crashed when calling the dcast formula.

  • 0

My code, which was running without problems before, crashed when calling the dcast formula. After playing around, I found out that even the minimal example from the help page of dcast does not work for me anymore. More precisely:

#Air quality example
names(airquality) <- tolower(names(airquality))
aqm <- melt(airquality, id=c("month", "day"), na.rm=TRUE)

acast(aqm, day ~ month ~ variable)
acast(aqm, month ~ variable, mean)

The last line produces the following error:

Error in vaggregate(.value = value, .group = overall, .fun = fun.aggregate,  : 
  could not find function ".fun"

Here is my sessionInfo():

R version 2.13.1 (2011-07-08)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] C

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_0.8.9   proto_0.3-9.2   reshape2_1.1    xtable_1.5-6    reshape_0.8.4   plyr_1.5.2      lubridate_0.2.5

loaded via a namespace (and not attached):
[1] stringr_0.5  tools_2.13.1

I don’t come up with a satisfying answer of what is going wrong here, so I would appreciate some help. Also, I found the following thread here on stackoverflow: Similar problem
This problem seems to result from a custom function. I, however, use the standard mean function and a standard example from the help page.

UPDATE: I just did some internet research and did not find any information regarding an update of the reshape2 package. This was the best guess I had regarding the problem.

UPDATE2: The problem occurred because I most probably reassigned the mean function while I was playing around with a statisctic example during an R session. Restarting R solved the problem. Now, everything works as expected again.

  • 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-05-26T06:58:37+00:00Added an answer on May 26, 2026 at 6:58 am

    For completeness:

    PaulHurleyuk’s comment:

    Have you tried restarting R and trying the example in a fresh session
    ? Or do rm(list=ls()) to remove everything from the current session.
    In the past I have managed to break things by assigning something to
    something that shouldn’t be assigned to.

    Christoph_J’s response:

    Thanks … that was exactly the problem…

    The problem occurred because I most probably reassigned the mean
    function while I was playing around with a statisctic example during
    an R session. Restarting R solved the problem. Now, everything works
    as expected again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code which is been running by a backgroundworker I'd like some
I'm running Ubuntu to compile a set of code which requires python 2.4. How
Hello friends i am running code given below which contains the setLogTimeEntery function and
Code which I have inherited keeps crashing out rather powerfully with the following error
I have added some code which compiles cleanly and have just received this Windows
I have some code which collects points (consed integers) from a loop which looks
I have some Ruby code which takes dates on the command line in the
I have have some code which adds new cells to a table and fills
I have some code which utilizes parameterized queries to prevent against injection, but I
I have some code which I am making available via RMI. If my program

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.