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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:33:25+00:00 2026-06-15T12:33:25+00:00

I have a little problem with RStudio and the automatic export options. I have

  • 0

I have a little problem with RStudio and the automatic export options.
I have a big script which creates a lot of plots and I use the following code for this.

for(i in 1:2){
  if(i == 1)
    pdf(file="/home/steffen/Downloads/test.pdf",width=12,height=8)![enter image description here][1]
  plot(1:3);
  if(i == 1)
    dev.off()
}

enter image description here

This works quite well, but I have to use the plots in Microsoft Word and Word does not really like to include PDFs …
so it would be great if I could create pngs instead. I tried ‘convert’ command in linux but the result is that die pdf which is about 20kb is afterwords about 1MB as png and the quality is not as expected.
My script is the following:

for i in "$@"; do
  dst="${i%pdf}png"
  convert -density 1000x1000 -resize 3000x3000 -quality 95 "$i" "./png/$dst"
done

So does anyone have a good idea how to create a png which is not so large but has a good quality.

Either directly with RStudio or afterwords a conversation an automatic conversation.

  • 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-15T12:33:26+00:00Added an answer on June 15, 2026 at 12:33 pm

    Use the png function.

    png(file="path.png",width=12,height=8)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little problem with a FileReference which I use to let users
I have little problem to get file name after upload (PHP script for upload
I have a little problem with following code, it throws a error saying that
I have a little problem. I use a direct link to connect to my
I have little problem with printing data like this, I have written script like
I have little problem with deleting multiple lines with sed. I read a lot
I have little problem. I can't use AcceptVerb.Get on some ASP.NET MVC actions because
I have a little problem with export data to csv (comma-separated values). All data
I have a little problem with export data to csv (comma-separated values). All data
I have a little problem... I have made an Android application which extends the

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.