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

  • SEARCH
  • Home
  • 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 7434055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:46:18+00:00 2026-05-29T09:46:18+00:00

I have an R code block that generates an image (see below). Executing the

  • 0

I have an R code block that generates an image (see below). Executing the code is no problem (i.e., C-c C-c from within the block generates an image temp.png as expected). However, on export to PDF via LaTeX, there is an error message:

org-babel-sha1-hash: Wrong number of arguments: called-interactively-p, 1

The only other reference to this error (sans the bit about sha1) is from here, Link in a very diffirent context.

The code block closely follows the example from this previous question Embedding R plots in Latex via org-mode
Here’s the code:

#+NAME: optimal_applications 
#+BEGIN_SRC R  :results graphics :file temp.png :exports both  
require(ggplot2) 
c <- c(.01, .05, .10) 
df <- data.frame(q =
  rep((0:100)/100, length(c)), 
c = c(sapply(c, function(x) rep(x,  101))) )

df$s.star <- with(df, log(-c/log(1-q))/log(1-q))
df$s.star[df$s.star < 0] <- 0

g <- ggplot(df, aes(x = q, y = s.star, colour=factor(c))) + geom_line(aes(group=factor(c))) +
    xlab("Probability that an application is successful") +
    ylab("Optimal number of applications to send")
print(g) 
#+END_SRC   

Update: org-mode & emacs version

Org-mode version 7.8.03 (release_7.8.03.267.g1c8eb)
GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-04 on crested, modified by Debian
  • 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-29T09:46:19+00:00Added an answer on May 29, 2026 at 9:46 am

    After learning that G.Jay Kerns couldn’t reproduce with a newer version of Emacs, I upgraded to Emacs 24.0.91.1 and the problem was resolved. FWIW, https://superuser.com/questions/296013/how-do-i-upgrade-emacs-to-the-current-version-on-ubuntu has short tutorial on how to build Emacs from the repository that proved useful.

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

Sidebar

Related Questions

I have a block of code that is repeated within a DB2 stored procedure.
We have have a block of code that generates a lot of exceptions (IndexOutOfRangeException
I have some code that retrieves an image from the web using this method
I have a small code block that should append text to the beg of
I have a block of code that works and I wanted to ask what
I have a block of code that basically intializes several classes, but they are
I have a block of code that serializes a type into a Html tag.
I have a code snippet written in PHP that pulls a block of text
I have a block of JSP code that needs to be used in several
I have a submit button that is a block of HTML code because of

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.