R is an open source programming language and software environment for statistical computing and graphics. It is an implementation of the S programming language combined with lexical scoping semantics inspired by Scheme.

learn more… | top users | synonyms

1
vote
0answers
2k views

Fatal error occurred, no output PDF file produced in php file [closed]

We are using following code in .php script for generate .pdf file. $result1 = exec("R CMD Sweave /var/www/html/r/r_latex_sweave.Rnw"); $result2 = exec("pdflatex /var/www/html/r/r_latex_sweave.tex"); ...
1
vote
0answers
69 views

Links of book templates [duplicate]

This report is written by using R and Latex. I am kind of curious to see the Latex and R codes behind the generation of this excellent report. Can anyone suggest me some links directing to excellent ...
1
vote
0answers
44 views

Citations not working in Sweave [duplicate]

I am trying to run this Sweave code in R. \documentclass{article} \begin{document} \SweaveOpts{concordance=TRUE} \section{Section} I am citing \cite{ftest}. \begin{thebibliography}{9} ...
1
vote
0answers
182 views

knitr : Figure are not appearing at the correct place [duplicate]

I'm trying to use knitr while learning LaTeX but all my figures are placed at a seemingly random place. It's driving me insane. Any ideas? Example Input PDF Output I tried reinstalling TeX Live ...
1
vote
0answers
357 views

R: Prettify xtable() output for printing a matrix or dataframe [closed]

Following a suggestion, this is a repost from stackoverflow. I am trying to print out this table from R using xtable(). The default output is ugly. Is it possible to embed latex code within xtable() ...
0
votes
1answer
123 views

How can I include the R source code in the appendix?

I really have no idea how to include the R code into latex, so I only can provide my R code. I would like to put it in the appendix. I am really looking forward to your help. Thx! The codes will show ...
0
votes
1answer
2k views

Quality of R plots in LaTeX [closed]

In R, I use par to prepare four boxplots (using boxplot) as a single image, which I save with the png() command. This image is included in a LaTeX document with \includegraphics. I have experimented ...
0
votes
2answers
275 views

How to remove name while including image in LaTeX?

I am including an image in R and found the name of the image file appearing with the image: name<-c("A.pdf","B.pdf","C.pdf","D.pdf") <<echo=FALSE,results=tex>>= for (i in 1:4) ...
0
votes
1answer
484 views

What's wrong with this Sweave Document

Every time I run the code below, it runs without error. It is only when I try to sweave the output in the last frame requested does it fail. What's more confusing to a LaTeX/Sweaving newbie like ...
0
votes
1answer
170 views

Making extra produced schunk globally invisible in Sweave

I'm using ASREML-R for data analysis. When I fit the model in ASREML-R, it produces some information regarding the model like this dat <- data.frame(y=rnorm(20),x=seq(1,20)) ex.asr <- asreml(y ...
0
votes
1answer
2k views

How to disable null device while usin dev.off() in R and latex?

How to disable message null device when using R and latex. <<echo=FALSE ,results=tex>>= data<-read.table("test",sep="\t",header=TRUE,check.names=FALSE) ...
0
votes
1answer
181 views

“Math Processing Error” when processing LaTeX using knitr in R

I've never had any problem with my Latex appearing properly when using knitr before, but recently when I compile my document, I get this error: I'm not sure why this is happening. The error output ...
0
votes
1answer
111 views

Two graph - same page? (R/LaTeX)

I am using R to create my graph, and I am doing a paper, where I have to put two graph, as showed in the image: In R, my output looks like: y1 <- c(6524, 6701, 6946, 7080, 6920, 6887, 6660, ...
0
votes
1answer
56 views

Chunk of text on the right of a picture

I have a portion of a latex document that is similar to: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor} \includegraphics[width=0.5\linewidth]{figure/plot} \hfill{} ...
0
votes
1answer
157 views

Question mark in knitr code getting quote marks [closed]

I'm trying to use question marks in a code block using knitr, but in the compiled pdf always puts quotes around it, so, for example <<helpCode, eval=FALSE>>= ?rnorm @ comes out as ...
0
votes
1answer
235 views

DB dump into LaTeX with Python and R?

I have quite a large index. I am planning to create a full-blown DB for it and later export the information to LaTeX. I am comfortable with R and Python so I would like to work with them but I feel ...
0
votes
1answer
199 views

xtable in pgfSweave (on lyx) : output=tex is invalid?

Many tutorials online say that to include a table in Sweave one should write something like this: <<output=tex>>= require(xtable) stuff xtable(stuff) @ That makes sense. But when I do ...
0
votes
2answers
2k views

generate a PDF containing R output inside latex table

I wrote a script that generates 4 variables from 2 for loops, each one of them contain a big number of data. I want to place these variables inside a data frame and then create a latex table so I can ...
0
votes
0answers
51 views

How can I nest a code chunk within an enumerate environment when using R Markdown?

When I attempt to do this using this code: --- title: "Title" author: "Me" date: "31 October 2014" output: pdf_document: includes: in_header: includes.sty --- ...
0
votes
1answer
105 views

Sweave and R 3.1.0: no pdfs generated

After upgrading R to version 3.1.0 (from some version 2.x.x), the following sweave code does not produce any pdfs for the plots anymore: \documentclass[a4paper,10pt]{article} \SweaveOpts{echo=FALSE} ...
0
votes
0answers
71 views

Convert .R into Latex

I'm really new at this and I couldn't found any realted subject. So I've created my .R file where I generate my graphs from my data: barplot(wmaefile$FC,xaxt="n",col="snow2",border="black", ...
0
votes
0answers
66 views

Place multiple tables in a grid on a single page

I need to show several tables and figures on a single page. They are of different heights and widths and I would like to build a grid in which I could then put them. Is there a package that would ...
0
votes
0answers
89 views

Make .Rnw child document independent from main document

This is a followed-up question to this answer. I have a variables.Rnw document in charge with the task of loading data from R datafiles and create R variables that I will then compile into a .tex ...
0
votes
0answers
52 views

Is it possible to place a chunk within a chunk?

I am asking this question because I need to loop a \section tile by a chunk and place the according result in the section using another chunk. Here is an example of one circle: The chunk for ...
0
votes
0answers
347 views

Packages for Typesetting Specific R Output

Anyone know of a package that translates R output into LaTeX code for the following types of commands? exp(w1$coefficients) exp(confint(w1)) My input/output with the xtable and stargazer R ...
0
votes
0answers
195 views

knitr yielding different output in pdf than in R console

I am running RStudio Version 0.98.484 and R version 3.0.2 on OS X Mavericks. While using knitr I noticed a discrepancy between the console output from a summary() command and that generated in the ...
0
votes
0answers
28 views

How to prevent plots being printed out of document's sections? [duplicate]

I am preparing a document using knitr in which I have multiple charts within two or more sections. The majority of the plots is printed at the end of the document but I would like them to stay within ...
0
votes
0answers
228 views

How can I use a table generated by Latex in R(xtable)?

I have a LaTeX table generated by Excel. I want to place this table but not as a LaTeX code, but rather as a xtable. It is possible to convert LaTeX to xtable?
0
votes
0answers
2k views

Fatal error occurred, no output PDF file produced [duplicate]

we are executing following code from .php file. $result1 = shell_exec("R CMD Sweave /var/www/html/r/r_latex_sweave.Rnw"); $result2 = shell_exec("pdflatex /var/www/html/r/r_latex_sweave.tex"); But, ...