GithubHelp home page GithubHelp logo

Comments (5)

GuangchuangYu avatar GuangchuangYu commented on May 18, 2024 1

are you kidding me?

filename="inst/figures/imgfile.png")

there is no inst/figures folder in your current working directory.

  1. don't just copy paste without looking at the code.
  2. read the error before posting.

from hexsticker.

j-harbin avatar j-harbin commented on May 18, 2024

To provide further detail to this issue:

When I use the code, similar to the example for 'image file'

imgurl <- system.file("argoFloatsLogo.png", package="hexSticker")
sticker(imgurl, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=.6,
        filename="inst/figures/imgfile.png")

I receive the following error:


Error in grDevices::png(..., res = dpi, units = "in") : 
  unable to start png() device
In addition: Warning messages:
1: In grDevices::png(..., res = dpi, units = "in") :
  unable to open file 'inst/figures/imgfile.png' for writing
2: In grDevices::png(..., res = dpi, units = "in") : opening device failed

Thank you for your help!

from hexsticker.

GuangchuangYu avatar GuangchuangYu commented on May 18, 2024

the command is wrong.

imgurl <- system.file("argoFloatsLogo.png", package="hexSticker")

just use:

imgurl <- remote_url__or__file_path_in_your_system

from hexsticker.

j-harbin avatar j-harbin commented on May 18, 2024

Hi there,

I tried that as well. When I use the following code:

imgurl <- "C:/Users/harbinj/Documents/GitHub/argoFloats/sandbox/jlh/02_Logo/argoFloatsLogo.png"
sticker(imgurl, package="argoFloats", p_size=20, s_x=1, s_y=.75, s_width=.6,
        filename="inst/figures/imgfile.png")

And I receive the following error:

Error in grDevices::png(..., res = dpi, units = "in") : 
  unable to start png() device
In addition: Warning messages:
1: In grDevices::png(..., res = dpi, units = "in") :
  unable to open file 'inst/figures/imgfile.png' for writing
2: In grDevices::png(..., res = dpi, units = "in") : opening device failed

Thanks again!

from hexsticker.

j-harbin avatar j-harbin commented on May 18, 2024

Hi there,

My apologies, I relatively new to R and still learning. Thank you for pointing that out, the code now works for me.

from hexsticker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.