directory problems?

137 views
Skip to first unread message

spg...@gmail.com

unread,
Aug 23, 2014, 11:19:03 AM8/23/14
to tikzd...@googlegroups.com
Hi, I'm trying to get the tikzDevice working but having no joy. I suspect there is some problem finding the required latex files but I can't seem to fix it.

I try:

> require(tikzDevice)
Loading required package: tikzDevice
Loading required package: filehash
filehash: Simple key-value database (2.2-2 2013-12-16)
Warning messages:
1: package ‘tikzDevice’ was built under R version 3.0.3 
2: package ‘filehash’ was built under R version 3.0.2 
> tikz('normal.tex', width=8, height=8)
plot(meca108Ea,type='b',ylab='$V outcome$',xlab='$Trial$')
Creating temporary TikZ metrics dictionary at:
        C:\Users\Admin\AppData\Local\Temp\RtmpYHY27m/tikzMetricsDictionary
Error in system(latexCmd, intern = T, ignore.stderr = T) : 
  'C:\PROGRA~2\MiKTeX' not found

Then:
> options (tikzLatex = "C:\\Program Files (x86)\\MiKTeX 2.9\\miktex\\bin")
> tikz('normal.tex', width=8, height=8)
> plot(meca108Ea,type='b',ylab='$V outcome$',xlab='$Trial$')
Error in system(latexCmd, intern = T, ignore.stderr = T) : 
  'C:\Program' not found 

I've tried a few version but I'm not getting anywhere, does anyone know what the solution might be?

Thanks, Steve

Carsten Oppitz

unread,
Sep 23, 2014, 12:34:07 PM9/23/14
to tikzd...@googlegroups.com
I had the same error.
"Error in system(latexCmd, intern = T, ignore.stderr = T) : 'E:/Program' not found"

Then I tried to just plot my data:

> ggplot(as.data.frame(demand),aes(x=seq(1,length(demand)), y=demand))+geom_line()

But the same error appeared again, because some tikzDevices were still active in the background.
Try:
>dev.list()
and terminate all devices (I have to terminate all current devices manually  with dev.off() !). At least the error disappeared then when re-using tkiz():

> tikz(file=filename , width=3.5,height=3.5)
> plot<-ggplot(as.data.frame(demand),aes(x=seq(1,length(demand)), y=demand))+geom_line()
> dev.off() RStudioGD 2

File is successfully created (I checked creation time of the file), but unfortunately it isn't working with ggplot2 package properly. Output of the .tex file is

% Created by tikzDevice version 0.7.0 on 2014-09-23 18:30:40
% !TEX encoding = UTF-8 Unicode

spg...@gmail.com

unread,
Sep 26, 2014, 4:44:14 PM9/26/14
to tikzd...@googlegroups.com
Thanks Carsten. I tried again turning-off the device as you suggested and still no joy. Ho hum. I'm wondering if it has something to do with Windows long file names.

kirill...@gmail.com

unread,
Apr 10, 2015, 4:41:33 PM4/10/15
to tikzd...@googlegroups.com
This might be related to a problem that is already fixed in the development version on GitHub.
Reply all
Reply to author
Forward
0 new messages