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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:41:14+00:00 2026-05-28T02:41:14+00:00

I am calling an R function from the R package e1071 which is interfaced

  • 0

I am calling an R function from the R package e1071 which is interfaced with libsvm (a C program). This function is passing C (printf) warning messages to the R console. I know this because the warning messages are of the form (warning:…) whereas R warning messages are capitalized (i.e. Warning:…).

I’ve tried everything to get rid of these messages in R (sink, suppressWarnings, invisible) but nothing seems to work.

Any ideas?

Thanks!

  • 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-28T02:41:15+00:00Added an answer on May 28, 2026 at 2:41 am

    The function uses stdio instead of Rprintf/REprintf or warning which is why re-direction of the R output won’t work. The proper solution is to fix the calls in libsvm to use R output instead.

    Hacking the stdio output is possible – you can re-direct the output to your own pipe and do what you want with it, but a) it’s a bit of work in C and b) it’s dangerous because you need to restore the standard behavior after you’re done with the function – even if it errors out and c) in may interact with R output if used on a shell.

    If you want a really whacky, dirty yet quick solution, run your function in collect(parallel(..., silent=TRUE))[[1]] from multicore – it suppresses stdout (you can add multicore:::closeStderr() if you want to suppress stderr as well).

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

Sidebar

Related Questions

I need this for calling a C function from Java class (JNI) and I
I made a package which I can use like this: select * from table(my_package.my_function(99,
The calling function from php does not work... function Footer() { $this->Cell($this->PG_W, 5, 'All
i am calling this function from the menu and calls the upload(item) function to
I am calling a function from my java code and i am getting this
I am calling a function from a native .NET dll like this: string v
I'm calling a function from a native DLL which returns a char* pointer, how
Is there anyway to calling a function from another function .. little hard to
So, I am calling a function from an unmanaged .dll file from my C#
I'm trying to return a value from (transport) to the calling function, but can't

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.