Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using grViz #438

Closed
anvillarroel opened this issue Jul 29, 2021 · 1 comment
Closed

Error using grViz #438

anvillarroel opened this issue Jul 29, 2021 · 1 comment

Comments

@anvillarroel
Copy link

anvillarroel commented Jul 29, 2021

Hi, I'm trying to use grViz (DiagrammerR library) but I get en error
Error in setwd(dir) : cannot change working directory
when using:

setwd("PATH_TO_FILE")     (using / instead of \\)
grViz("file.dot")

I thought that maybe the path was wrong, then I tried to test a code as simples as this (taken from https://rich-iannone.github.io/DiagrammeR/graphviz_and_mermaid.html), with the same result:

grViz("
digraph boxes_and_circles {

  # a 'graph' statement
  graph [overlap = true, fontsize = 10]

  # several 'node' statements
  node [shape = box,
        fontname = Helvetica]
  A; B; C; D; E; F

  node [shape = circle,
        fixedsize = true,
        width = 0.9] // sets as circles
  1; 2; 3; 4; 5; 6; 7; 8

  # several 'edge' statements
  A->1 B->2 B->3 B->4 C->A
  1->D E->A 2->4 1->5 1->F
  E->6 4->6 5->7 6->7 3->8
}
")

I guess I'm missing something,. :(

@anvillarroel
Copy link
Author

I solved it. It was a problem regarding my computer and some configuration.
For same reason R, in the Temporal Directory linked to my user profile, has not enough permissions to access.
So I create a new directory (I prefert this than to mess with my user profile): c:\rtemp and then I create a file Renviron.site inside C:\Program Files\R\R-4.1.1\etc (I'm using 4.1.1) with the following content:
TMPDIR=C:/rtemp
TMP=C:/rtemp
TEMP=C:/rtemp

And after restarting R o RStudio (and using tempdir() to be sure) I dind't get any error message again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants