Re: [R] tikzDevice and Sweave

2016-01-18 Thread Yihui Xie
Yeah, the philosophy of knitr from the very beginning is that if you
want to draw a plot, simply draw it, and knitr will take care of the
rest of work (http://i.imgur.com/jrwbX.jpg). You rarely need to think
about graphical devices or LaTeX or a specific output format. With
knitr, the example can be reduced to the absolutely minimal:

\documentclass{article}
\begin{document}
<<tikzFig, echo=FALSE, dev='tikz', fig.width=4, fig.height=3>>=
plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x",
ylab = "sin(x)")
@
\end{document}


Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name


On Mon, Jan 18, 2016 at 6:30 AM, Duncan Murdoch
<murdoch.dun...@gmail.com> wrote:
> On 18/01/2016 6:12 AM, Naresh Gurbuxani wrote:
>>
>> Duncan,
>>
>> Many thanks for looking at my code and for your suggestion.
>>
>> Your solution works.  But my problem is different.  This code gives me a
>> tex file with a lot of tikz code.  If there are several graphs in the
>> document, then tex file become very large.  I would like the code to result
>> in a pdf file for each graph.  When this pdf file is included in the tex
>> file, the tex file is more readable.
>
>
> You probably don't want to do that -- tikz outputs LaTeX code, so you'd need
> to run pdflatex once in every figure in your document.  And you probably
> shouldn't care:  when using Sweave, the .tex file is not really of interest.
> Concentrate on the .Rnw file as the source file.
> However, sometimes you need to deal with other people...
>
> You can easily redirect tikz output to a file, and \input{} that file. Just
> change the figure chunk to
>
> <>=
> library(tikzDevice)
> # added height and width
> tikz(file = "tikzFig.tex", width = 4, height = 3)
> plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab =
> "sin(x)")
> dummy <- dev.off()
> cat("\\input{tikzFig.tex}")
> @
>
> As mentioned, this is a bit simpler in knitr.
>
> Duncan Murdoch
>
>
>> Naresh
>>
>> 
>>>
>>> From: dulca...@bigpond.com
>>> To: r-help@r-project.org
>>> Date: Mon, 18 Jan 2016 14:17:42 +1000
>>> Subject: Re: [R] tikzDevice and Sweave
>>>
>>> Hi
>>>
>>> I use Sweave and some tikz in latex but not in Sweave
>>>
>>> Your problem is that you left out Sweave in the preamble
>>> It must be in the preamble of any Sweave document
>>>
>>> I added sizing so that it is not off the page.
>>> I do not know if Sweave options will cover this or you have to set it.
>>> eg
>>> \setkeys{Gin}{width=1.0\textwidth}
>>>
>>> \documentclass{article}
>>> \usepackage{tikz}
>>> \usepackage{Sweave}
>>>
>>> \begin{document}
>>>
>>> Figure~\ref{tikzExampleFig} is an example of \texttt{tikzDevice} package.
>>>
>>> \begin{figure}
>>> \begin{center}
>>>
>>> <>=
>>> # % <>=
>>>
>>> # %<<tikzFig, echo = FALSE, fig = TRUE>>=
>>> # setwd("/Users/nareshgurbuxani/Documents/tex/tikz")
>>> library(tikzDevice)
>>>
>>> # added height and width
>>> tikz(console = TRUE, width = 4, height = 3)
>>> plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab =
>>> "sin(x)")
>>> dummy <- dev.off()
>>> @
>>>
>>> \caption{Example of tikz graph}
>>> \label{tikzExampleFig}
>>> \end{center}
>>> \end{figure}
>>>
>>> \end{document}
>>>
>>> If this is an example for a larger document then have a look at the latex
>>> hyperref package
>>>
>>> Regards
>>>
>>> Duncan
>>>
>>> Duncan Mackay
>>> Department of Agronomy and Soil Science
>>> University of New England
>>> Armidale NSW 2351
>>> Email: home: mac...@northnet.com.au
>>>
>>> -Original Message-
>>> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Naresh
>>> Gurbuxani
>>> Sent: Monday, 18 January 2016 06:54
>>> To: R-help@r-project.org
>>> Subject: Re: [R] tikzDevice and Sweave
>>>
>>> Resending as a useable example
>>>
>>> \documentclass{article}
>>> \usepackage{tikz}
>>>
>>> \begin{document}
>>>
>>> Figure~\ref{tikzExampleFig} is an example of \text

Re: [R] tikzDevice and Sweave

2016-01-18 Thread Duncan Murdoch

On 18/01/2016 6:12 AM, Naresh Gurbuxani wrote:

Duncan,

Many thanks for looking at my code and for your suggestion.

Your solution works.  But my problem is different.  This code gives me a tex 
file with a lot of tikz code.  If there are several graphs in the document, 
then tex file become very large.  I would like the code to result in a pdf file 
for each graph.  When this pdf file is included in the tex file, the tex file 
is more readable.


You probably don't want to do that -- tikz outputs LaTeX code, so you'd 
need to run pdflatex once in every figure in your document.  And you 
probably shouldn't care:  when using Sweave, the .tex file is not really 
of interest.  Concentrate on the .Rnw file as the source file.

However, sometimes you need to deal with other people...

You can easily redirect tikz output to a file, and \input{} that file. 
Just change the figure chunk to


<>=
library(tikzDevice)
# added height and width
tikz(file = "tikzFig.tex", width = 4, height = 3)
plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab 
= "sin(x)")

dummy <- dev.off()
cat("\\input{tikzFig.tex}")
@

As mentioned, this is a bit simpler in knitr.

Duncan Murdoch


Naresh



From: dulca...@bigpond.com
To: r-help@r-project.org
Date: Mon, 18 Jan 2016 14:17:42 +1000
Subject: Re: [R] tikzDevice and Sweave

Hi

I use Sweave and some tikz in latex but not in Sweave

Your problem is that you left out Sweave in the preamble
It must be in the preamble of any Sweave document

I added sizing so that it is not off the page.
I do not know if Sweave options will cover this or you have to set it.
eg
\setkeys{Gin}{width=1.0\textwidth}

\documentclass{article}
\usepackage{tikz}
\usepackage{Sweave}

\begin{document}

Figure~\ref{tikzExampleFig} is an example of \texttt{tikzDevice} package.

\begin{figure}
\begin{center}

<>=
# % <>=

# %<<tikzFig, echo = FALSE, fig = TRUE>>=
# setwd("/Users/nareshgurbuxani/Documents/tex/tikz")
library(tikzDevice)

# added height and width
tikz(console = TRUE, width = 4, height = 3)
plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab =
"sin(x)")
dummy <- dev.off()
@

\caption{Example of tikz graph}
\label{tikzExampleFig}
\end{center}
\end{figure}

\end{document}

If this is an example for a larger document then have a look at the latex
hyperref package

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Naresh
Gurbuxani
Sent: Monday, 18 January 2016 06:54
To: R-help@r-project.org
Subject: Re: [R] tikzDevice and Sweave

Resending as a useable example

\documentclass{article}
\usepackage{tikz}

\begin{document}

Figure~\ref{tikzExampleFig} is an example of \texttt{tikzDevice} package.

\begin{figure}
\begin{center}

<>=
# % <>=

# %<<tikzFig, echo = FALSE, fig = TRUE>>=
# setwd("/Users/nareshgurbuxani/Documents/tex/tikz")
library(tikzDevice)

tikz(console = TRUE)
plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab =
"sin(x)")
dummy <- dev.off()
@

\caption{Example of tikz graph}
\label{tikzExampleFig}
\end{center}
\end{figure}

\end{document}



Subject: Re: [R] tikzDevice and Sweave
To: naresh_gurbux...@hotmail.com; r-help@r-project.org
From: murdoch.dun...@gmail.com
Date: Sun, 17 Jan 2016 15:40:24 -0500

On 17/01/2016 3:25 PM, Naresh Gurbuxani wrote:

I want to use tikz() function in tikzDevice package so that it generates

a pdf file to be included in the bigger tex file. Below code works, but
directly inserts tikz commands in the output tex file.

This works:
<>=
This does not work:
<>=
Full code is given below:
\documentclass{article}\usepackage{tikz}
Figure~\ref{tikzExampleFig} is and an example of \texttt{tikzDevice}

package.

\begin{figure}\begin{center}
<>=
library(tikzDevice)tikz(console = TRUE)plot(sin, -pi, pi, main = "A stand

alone TikZ plot", xlab = "x", ylab = "sin(x)")dummy <- dev.off()@

\caption{Example of tikz

graph}\label{tikzExampleFig}\end{center}\end{figure}

\end{document}


Your example isn't usable -- please post in plain text, not HTML.

I can't tell whether you are trying to use Sweave or knitr. If you're
using knitr, see the discussion of dev = "tikz" in
<http://yihui.name/knitr/>. If you're using Sweave, you probably need
pgfSweave.

Duncan Murdoch



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and

Re: [R] tikzDevice and Sweave

2016-01-17 Thread Duncan Mackay
Hi 

I use Sweave  and some tikz in latex but not in Sweave

Your problem is that you left out Sweave in the preamble
It must be in the preamble of any Sweave document

I added sizing so that it is not off the page. 
I do not know if Sweave options will cover this or you have to set it.
eg
\setkeys{Gin}{width=1.0\textwidth}   

\documentclass{article}
\usepackage{tikz}
\usepackage{Sweave}

\begin{document}

Figure~\ref{tikzExampleFig} is an example of \texttt{tikzDevice} package. 

\begin{figure}
\begin{center}

<>=
# % <>=

# %<<tikzFig, echo = FALSE, fig = TRUE>>=
# setwd("/Users/nareshgurbuxani/Documents/tex/tikz")
library(tikzDevice)

# added height and width
tikz(console = TRUE, width = 4, height = 3)
plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab =
"sin(x)")
dummy <- dev.off()
@

\caption{Example of tikz graph}
\label{tikzExampleFig}
\end{center}
\end{figure}

\end{document}

If this is an example for a larger document then have a look at the latex
hyperref package

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Naresh
Gurbuxani
Sent: Monday, 18 January 2016 06:54
To: R-help@r-project.org
Subject: Re: [R] tikzDevice and Sweave

Resending as a useable example

\documentclass{article}
\usepackage{tikz}

\begin{document}

Figure~\ref{tikzExampleFig} is an example of \texttt{tikzDevice} package. 

\begin{figure}
\begin{center}

<>=
# % <>=

# %<<tikzFig, echo = FALSE, fig = TRUE>>=
# setwd("/Users/nareshgurbuxani/Documents/tex/tikz")
library(tikzDevice)

tikz(console = TRUE)
plot(sin, -pi, 2*pi, main = "A stand alone TikZ plot", xlab = "x", ylab =
"sin(x)")
dummy <- dev.off()
@

\caption{Example of tikz graph}
\label{tikzExampleFig}
\end{center}
\end{figure}

\end{document}


> Subject: Re: [R] tikzDevice and Sweave
> To: naresh_gurbux...@hotmail.com; r-help@r-project.org
> From: murdoch.dun...@gmail.com
> Date: Sun, 17 Jan 2016 15:40:24 -0500
>
> On 17/01/2016 3:25 PM, Naresh Gurbuxani wrote:
>> I want to use tikz() function in tikzDevice package so that it generates
a pdf file to be included in the bigger tex file. Below code works, but
directly inserts tikz commands in the output tex file.
>> This works:
>> <>=
>> This does not work:
>> <>=
>> Full code is given below:
>> \documentclass{article}\usepackage{tikz}
>> Figure~\ref{tikzExampleFig} is and an example of \texttt{tikzDevice}
package.
>> \begin{figure}\begin{center}
>> <>=
>> library(tikzDevice)tikz(console = TRUE)plot(sin, -pi, pi, main = "A stand
alone TikZ plot", xlab = "x", ylab = "sin(x)")dummy <- dev.off()@
>> \caption{Example of tikz
graph}\label{tikzExampleFig}\end{center}\end{figure}
>> \end{document}
>
> Your example isn't usable -- please post in plain text, not HTML.
>
> I can't tell whether you are trying to use Sweave or knitr. If you're
> using knitr, see the discussion of dev = "tikz" in
> <http://yihui.name/knitr/>. If you're using Sweave, you probably need
> pgfSweave.
>
> Duncan Murdoch
>
  
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice and Sweave

2016-01-17 Thread Duncan Murdoch

On 17/01/2016 3:25 PM, Naresh Gurbuxani wrote:

I want to use tikz() function in tikzDevice package so that it generates a pdf 
file to be included in the bigger tex file.  Below code works, but directly 
inserts tikz commands in the output tex file.
This works:
<>=
This does not work:
<>=
Full code is given below:
\documentclass{article}\usepackage{tikz}
Figure~\ref{tikzExampleFig} is and an example of \texttt{tikzDevice} package.
\begin{figure}\begin{center}
<>=
library(tikzDevice)tikz(console = TRUE)plot(sin, -pi, pi, main = "A stand alone TikZ plot", xlab = 
"x", ylab = "sin(x)")dummy <- dev.off()@
\caption{Example of tikz graph}\label{tikzExampleFig}\end{center}\end{figure}
\end{document}


Your example isn't usable -- please post in plain text, not HTML.

I can't tell whether you are trying to use Sweave or knitr.  If you're 
using knitr, see the discussion of dev = "tikz" in 
.  If you're using Sweave, you probably need 
pgfSweave.


Duncan Murdoch

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice and Sweave

2016-01-17 Thread Duncan Murdoch

On 17/01/2016 3:40 PM, Duncan Murdoch wrote:

On 17/01/2016 3:25 PM, Naresh Gurbuxani wrote:

I want to use tikz() function in tikzDevice package so that it generates a pdf 
file to be included in the bigger tex file.  Below code works, but directly 
inserts tikz commands in the output tex file.
This works:
<>=
This does not work:
<>=
Full code is given below:
\documentclass{article}\usepackage{tikz}
Figure~\ref{tikzExampleFig} is and an example of \texttt{tikzDevice} package.
\begin{figure}\begin{center}
<>=
library(tikzDevice)tikz(console = TRUE)plot(sin, -pi, pi, main = "A stand alone TikZ plot", xlab = 
"x", ylab = "sin(x)")dummy <- dev.off()@
\caption{Example of tikz graph}\label{tikzExampleFig}\end{center}\end{figure}
\end{document}


Your example isn't usable -- please post in plain text, not HTML.

I can't tell whether you are trying to use Sweave or knitr.  If you're
using knitr, see the discussion of dev = "tikz" in
.  If you're using Sweave, you probably need
pgfSweave.



Okay, I see from your subject line that you're using Sweave.  I don't 
think you can do better than your "This works" example without switching 
to knitr.


Duncan Murdoch

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice

2013-07-27 Thread Yihui Xie
It seems I can still install from source under Ubuntu:

install.packages('tikzDevice', repos='http://r-forge.r-project.org',
type='source')

If you are under Windows, I think you have to install RTools.

I'm cc'ing its author to see if there is still hope to get it back to
CRAN, or if someone else can resurrect this great package and the
original author is willing to hand over the maintainership.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 206-667-4385 Web: http://yihui.name
Fred Hutchinson Cancer Research Center, Seattle


On Sat, Jul 27, 2013 at 6:49 PM, David Arnold dwarnol...@suddenlink.net wrote:
 All,

 What is the current method for installing tikzDevice in R version 3.0.1? I'd
 like to use it with knitr and RStudio.

 Thanks.

 D.



 --
 View this message in context: 
 http://r.789695.n4.nabble.com/tikzDevice-tp4672523.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice

2013-07-27 Thread David Arnold
I am using a MacBook Pro, 10.6.8, R version 3.0.1. and RStudio 0.97.551. I
entered your command in the Console Window in RStudio and got the following
reply:

 install.packages('tikzDevice', repos='http://r-forge.r-project.org',
 type='source')
Warning in install.packages :
  package ‘tikzDevice’ is not available (for R version 3.0.1)
trying URL
'http://r-forge.r-project.org/src/contrib/tikzDevice_0.6.3.tar.gz'
Content type 'application/x-gzip' length 1733547 bytes (1.7 Mb)
opened URL
==
downloaded 1.7 Mb

* installing *source* package ‘tikzDevice’ ...
** libs
llvm-gcc-4.2 -arch x86_64 -std=gnu99
-I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/usr/local/include-fPIC  -mtune=core2 -g -O2  -c tikzDevice.c -o
tikzDevice.o
tikzDevice.c: In function ‘TikZ_Setup’:
tikzDevice.c:286: warning: passing argument 1 of ‘__builtin___strcpy_chk’
discards qualifiers from pointer target type
tikzDevice.c:286: warning: passing argument 1 of ‘__inline_strcpy_chk’
discards qualifiers from pointer target type
tikzDevice.c:288: warning: passing argument 1 of ‘__builtin___strcpy_chk’
discards qualifiers from pointer target type
tikzDevice.c:288: warning: passing argument 1 of ‘__inline_strcpy_chk’
discards qualifiers from pointer target type
tikzDevice.c:290: warning: passing argument 1 of ‘__builtin___strcpy_chk’
discards qualifiers from pointer target type
tikzDevice.c:290: warning: passing argument 1 of ‘__inline_strcpy_chk’
discards qualifiers from pointer target type
tikzDevice.c: In function ‘TikZ_Close’:
tikzDevice.c:579: warning: passing argument 1 of ‘free’ discards qualifiers
from pointer target type
tikzDevice.c:580: warning: passing argument 1 of ‘free’ discards qualifiers
from pointer target type
tikzDevice.c:581: warning: passing argument 1 of ‘free’ discards qualifiers
from pointer target type
llvm-gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
-multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o
tikzDevice.so tikzDevice.o -F/Library/Frameworks/R.framework/.. -framework R
-Wl,-framework -Wl,CoreFoundation
installing to
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/tikzDevice/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   ‘tikzDevice.Rnw’ 
** testing if installed package can be loaded
* DONE (tikzDevice)

The downloaded source packages are in

‘/private/var/folders/qE/qEavkZWTFMmxjncuY+HnqE+++TI/-Tmp-/RtmpGK7w0V/downloaded_packages’



--
View this message in context: 
http://r.789695.n4.nabble.com/tikzDevice-tp4672523p4672525.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice

2013-07-27 Thread David Arnold
The following minimal example Sweave file compiled properly in RStudio.

\documentclass{article}

\begin{document}

Example text outside R code here; we know the value of pi is \Sexpr{pi}.
my-label, eval=TRUE, dev='tikz'=
set.seed(1213)  # for reproducibility
x = cumsum(rnorm(100))
mean(x)  # mean of x
plot(x, type = 'l')  # Brownian motion
@
Other text outside R code here.

\end{document}

Result:  junk.pdf http://r.789695.n4.nabble.com/file/n4672526/junk.pdf  



--
View this message in context: 
http://r.789695.n4.nabble.com/tikzDevice-tp4672523p4672526.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice not available

2012-08-18 Thread nikos giallousis
Hello all! Thank you for your advice.

The solution finally was like this:

first install filehash package
and then library(tikzDevice)

Just in case any one needs it.

Regards

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice not available

2012-08-17 Thread nikos giallousis
Hello, many thanks for the advice.

Unfortunately I did not mention that my os is Windows 7. I am sorry for
that.

Some feedback here?

 install.packages(tikzDevice, repos=http://R-Forge.R-project.org;)
Installing package(s) into ‘C:/Users/N31k/Documents/R/win-library/2.14’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository
http://R-Forge.R-project.org/bin/windows/contrib/2.14
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘tikzDevice’ is not available (for R version 2.14.2)
 utils:::menuInstallLocal()
Error in read.dcf(file.path(pkgname, DESCRIPTION), c(Package, Type))
:
  cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In read.dcf(file.path(pkgname, DESCRIPTION), c(Package, Type)) :
  cannot open compressed file 'tikzDevice_0.6.2.tar.gz/DESCRIPTION',
probable reason 'No such file or directory'

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice not available

2012-08-17 Thread Uwe Ligges



On 17.08.2012 12:37, nikos giallousis wrote:

Hello, many thanks for the advice.

Unfortunately I did not mention that my os is Windows 7. I am sorry for
that.

Some feedback here?


Yes: R-forge seems to support the current release version of R only re. 
binaries. If you want it for an old release of R, install from sources, 
i.e.:
install.packages(tikzDevice, repos=http://R-Forge.R-project.org;, 
type=source)


Uwe Ligges






install.packages(tikzDevice, repos=http://R-Forge.R-project.org;)

Installing package(s) into ‘C:/Users/N31k/Documents/R/win-library/2.14’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository
http://R-Forge.R-project.org/bin/windows/contrib/2.14
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
   package ‘tikzDevice’ is not available (for R version 2.14.2)

utils:::menuInstallLocal()

Error in read.dcf(file.path(pkgname, DESCRIPTION), c(Package, Type))
:
   cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In read.dcf(file.path(pkgname, DESCRIPTION), c(Package, Type)) :
   cannot open compressed file 'tikzDevice_0.6.2.tar.gz/DESCRIPTION',
probable reason 'No such file or directory'

[[alternative HTML version deleted]]



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice not available

2012-08-15 Thread peter dalgaard

On Aug 15, 2012, at 18:54 , nikos giallousis wrote:

 Hello people!
 
 I just formatted my disk, and I have installed R 2.14 over. Now I am trying
 to restore my packages and all.
 I realized that tikzDevice, a crucial package for me is gone. Fortunately,
 I have kept my old, non-zipped, tikzDevice
 folder, but none of the commands I know seems to handle this [i.e. load()
 and install.packages()].
 
 Thus the formulation is like this:
 
 how to install a package from a non-zipped folder

R CMD INSTALL myfolder

from the command line. The package is still available in the Archive and on 
R-forge though; dunno what the story is with the CRAN version...

 
 Thanks a lot
 
 Nijk
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice not available

2012-08-15 Thread Ulises M. Alvarez

On 08/15/2012 11:54 AM, nikos giallousis wrote:

I realized that tikzDevice, a crucial package for me is gone. Fortunately,
I have kept my old, non-zipped, tikzDevice
folder, but none of the commands I know seems to handle this [i.e. load()
and install.packages()].

Thus the formulation is like this:

how to install a package from a non-zipped folder


Hi:

I don't know whether or not it's possible to install from a non-zipped 
folder, but the tikzDevice may be found at:


http://cran.r-project.org/src/contrib/Archive/tikzDevice/
--
Ulises M. Alvarez
http://sophie.unam.mx/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice not available

2012-08-15 Thread Yihui Xie
I think it will come back again in the future. The maintainer is busy
at the moment: 
https://github.com/Sharpie/RTikZDevice/commit/95069e0a1deeb8fb9db028bbb76f227ddfcdc559#commitcomment-1562437

For now, the easiest way to install it is probably via R-Forge:

install.packages(tikzDevice, repos=http://R-Forge.R-project.org;)

Or just download the tarball from CRAN and R CMD INSTALL it.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Wed, Aug 15, 2012 at 11:54 AM, nikos giallousis n31...@gmail.com wrote:
 Hello people!

 I just formatted my disk, and I have installed R 2.14 over. Now I am trying
 to restore my packages and all.
 I realized that tikzDevice, a crucial package for me is gone. Fortunately,
 I have kept my old, non-zipped, tikzDevice
 folder, but none of the commands I know seems to handle this [i.e. load()
 and install.packages()].

 Thus the formulation is like this:

 how to install a package from a non-zipped folder

 Thanks a lot

 Nijk

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] TikzDevice

2012-04-27 Thread Prof Brian Ripley

On 27/04/2012 06:24, arun wrote:

Dear R'ers,

I have trouble installing tikzDevice in Ubuntu.  When I use 
install.packages(tikzDevice), it gives error message:

ERROR: dependency ‘filehash’ is not available for package ‘tikzDevice’
* removing ‘/usr/local/lib/R/site-library/tikzDevice’


Then I tried filehash installation, I get the message:

package ‘filehash’ is not available (for R version 2.13.1)

Any help will be appreciated.


Do study the posting guide (we know you have not because you sent HTML). 
 Updating your R (as the posting guide asked you to do before posting) 
will solve this.


Or, less conveniently,
http://cran.r-project.org/web/packages/filehash/index.html
tells you where to get a version of filehash as old as your R.



Thanks
AK
[[alternative HTML version deleted]]


--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice and sans serif

2011-11-28 Thread Thomas S. Dye
David Winsemius dwinsem...@comcast.net writes:

 On Nov 27, 2011, at 1:46 AM, Thomas S. Dye wrote:

 Aloha all,

 I haven't been able to find how to choose the font used by tikzDevice.
 My first tries have all been set with a serif font and I'd like to
 have
 them use the sans serif font instead.  I've looked through the
 documentation and googled a bit without success.  Is this possible?
 Can
 someone point me to instructions?

 It's not really an R question, is it?

 www.tug.org/pracjourn/2006-1/schmidt/schmidt.pdf

 --
 David Winsemius, MD
 West Hartford, CT


I guess not.  The (partial) solution is to change the font in LaTeX, as
you point out.  Thanks for that.  

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice and sans serif

2011-11-27 Thread David Winsemius


On Nov 27, 2011, at 1:46 AM, Thomas S. Dye wrote:


Aloha all,

I haven't been able to find how to choose the font used by tikzDevice.
My first tries have all been set with a serif font and I'd like to  
have

them use the sans serif font instead.  I've looked through the
documentation and googled a bit without success.  Is this possible?  
Can

someone point me to instructions?


It's not really an R question, is it?

www.tug.org/pracjourn/2006-1/schmidt/schmidt.pdf

--
David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice install problem

2011-09-23 Thread Uwe Ligges



On 23.09.2011 16:39, Helena Peña wrote:


Hi everybody!
I'm trying to install the tikzDevice package, and I keep on getting the

ERROR: dependency ‘filehash’ is not available for package ‘tikzDevice’

I tried install.packages('filehash') and I get

package ‘filehash’ is not available



Which OS? Which version of R? Which mirror? I guess Windows or Mac and 
your version of R is seriously outdated.


Uwe Ligges





Does anybody have the same problem or any hint?
thank youhelena 
[[alternative HTML version deleted]]




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice install problem

2011-09-23 Thread helena
OS linux 2.6.38 

R version 2.12.1

I tried the CRAN german mirrors 

http://mirrors.softliste.de/cran/
http://ftp5.gwdg.de/pub/misc/cran

and others from the UK...

--
View this message in context: 
http://r.789695.n4.nabble.com/tikzDevice-install-problem-tp3837315p3837457.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice compiling problem

2011-02-20 Thread cuass

Thank you!
-- 
View this message in context: 
http://r.789695.n4.nabble.com/tikzDevice-compiling-problem-tp3309028p3315247.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tikzDevice compiling problem

2011-02-17 Thread Yihui Xie
I don't think tikz() can capture the plots in rgl. To export rgl
graphics, you need to use rgl.snapshot() or rgl.postscript().

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Wed, Feb 16, 2011 at 9:19 AM, cuass fabianmauri...@hotmail.com wrote:

 Hi guys.
 The tex file which compile the following graphic has many problems. I don't
 know what's happening. Any input would be really appreciated.

 # Cargo el prgrama que produce el código en Latex
 require(tikzDevice)

 # Establezco directorio del programa
 setwd('/Users/fabiangarcia/Documents/R')

 # El siguiente programa produce el archivo tex
 tikz('CobbGRAF.tex', standAlone = TRUE, width=5, height=5)

 # La gráfica de la función de utilidad
 f = function(x, y) ((y)^1*(x)^1)
 x = seq(0,5,len=40)
 y = seq(0,5,len=40)
 z = outer(x, y, f)
  showsurface = function(x, y, z)
  persp3d(x,y,z, col=blue, alpha=0.3, axes=
  F)+{
  contours = contourLines(x,y,z)
  for (i in 1:length(contours)) {
  with(contours[[i]], lines3d(x, y, level, col=darkred))
  }
  }
  open3d()
  showsurface(x,y,z)

  # Cierro el device
 dev.off()

 # Compilo el archivo tex
 tools::texi2dvi('CobbGRAF.tex',pdf=F)
 --
 View this message in context: 
 http://r.789695.n4.nabble.com/tikzDevice-compiling-problem-tp3309028p3309028.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] TikzDevice and texi2dvi

2010-04-27 Thread Sharpie


Lorenzo Isella wrote:
 
 I think I solved my problems by resorting to the Ubuntu packages at
 
 http://bit.ly/c8izKy
 
 Cheers
 
 Lorenzo
 
 
 Dear All,
 I am starting to use the tikzDevice package, but I am experiencing some
 (minor problems).
 If I try to run the script at the end of the email, I get the following
 error
 
 
 Error in tools::texi2dvi(normal.tex, pdf = T) :
   Running 'texi2dvi' on 'normal.tex' failed.
 Messages:
 sh: /usr/bin/texi2dvi: not found
 
 How do I install the missing texi2dvi?
 
 I found some reference to it at
 http://bit.ly/bSYbxk
 but I have not understood well whether it is should already be part of
 my R base installation or not.
 I am running R 2.11 on Ubuntu 9.10.
 Many thanks
 
 Lorenzo
 

Hi Lorenzo,

It appears you are missing the texi2dvi program- this is a tool provided by
TeX or TeXinfo distributions, not R or tikzDevice.

In order to use the tikzDevice, you will need to install a TeX distribution
on your machine.  As you are running Linux, I highly recommend the TeXlive
distribution, which you can get from:

  http://www.tug.org/texlive/

I recommend using the net installer at:

  http://www.tug.org/texlive/acquire-netinstall.html

I would advise this over Debian packages, as it has been my experience that
the packages can be horribly out of data- for example the Ubuntu package
repository lists a build based on TeXlive 2007 as being available for 9.10.

The tikzDevice requires PGF/TikZ 2.00 to function properly which in turn
requires TeXlive 2008 or later.

Hope this helps!

-Charlie


-
Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: 
http://r.789695.n4.nabble.com/TikzDevice-and-texi2dvi-tp2067230p2068350.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.