similar to: Sweave: R code in self defined TeX-commands

Displaying 20 results from an estimated 1000 matches similar to: "Sweave: R code in self defined TeX-commands"

2012 Jan 08
3
Conditional Loop For Data Frame Columns
Hi, I am trying to create a script that will evaluate each column of a data frame, regardless of # columns, using some function and sorting the results by an index vector: #upload data (112 rows x 73 columns) SD <- read.csv("/Users/johnjacob/Desktop/StudentsData_RInput.csv", header=TRUE) #assign index vector ID <- SD[ ,2] #write indexed mean function meanfun <- function(x) {
2013 Aug 28
1
Error when using buildVignettes()
Dear all, When running function 'testQAReport()', which uses function 'buildVignettes()' to create a pdf-file I get the following error: > source("testQAReport.R") > testQAReport() Error in .get_package_metadata(pkgdir) : Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing. Since I did not get this error in earlier versions of R, could you
2017 Sep 27
1
possible bug in R CMD Rd2pdf
Sorry for the noise. I assumed I could run this in the same directory as R CMD check. If I cd into the package dir, and run it like R CMD Rd2pdf man it works. I was a bit sleep deprived yesterday. The fact that the output starts by Hmm ... looks like a package threw me off. That output suggests it should work, I think. So I would suggests either 1) handling both package and man directories
2017 Sep 27
3
possible bug in R CMD Rd2pdf
When I include the macros \packageAuthor, \packageDescription, \packageTitle, \packageMaintainer in a XX-package.Rd file, R CMD Rd2pdf fails with $ R CMD Rd2pdf mpra Hmm ... looks like a package Converting Rd files to LaTeX Error : mpra/man/mpra-package.Rd:6: file './DESCRIPTION' does not exist This does not happen if I comment out 4 occurrences of these 4 macros in mpra-package.Rd.
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl, I'm using something like: ----------------------- tex.tex --------------------------- \documentclass{article} \usepackage{graphicx} \usepackage{fancyvrb} \newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}} \newcommand{\myinput}[1] {\begin{scriptsize} \VerbatimInput[frame=single,label=#1]{#1} \end{scriptsize}} \title{The R logo,
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl, I'm using something like: ----------------------- tex.tex --------------------------- \documentclass{article} \usepackage{graphicx} \usepackage{fancyvrb} \newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}} \newcommand{\myinput}[1] {\begin{scriptsize} \VerbatimInput[frame=single,label=#1]{#1} \end{scriptsize}} \title{The R logo,
2008 Nov 14
1
Line breaks in mathematical formulae in Rd files (PR#13287)
Hi, This is a problem about writing R documentation (R-exts 2.6). The command "\deqn" defined in "Rd.sty" is: \newcommand{\deqn}[2]{\[#1\]} which will put mathematical formulae in the "displaymath" environment; that means line breaks are not allowed (or will not be shown) in formulae, but sometimes we do need multiple lines of formulae. One solution is to write
2010 May 31
3
two questions about PLOT
here ,I want to plot two lines in one figure.But I have two problems 1) how to move one of the y-axis to be the right ? I tried to the command"axis(2)",But I failed. 2) how to add the axis information correctly.Since I have use the cmommand "axis(1,at=1:6,labels=gradeinfo$gradenam)" but it seems that the correct information that I want is superposition with the old axis
2018 May 25
2
Rd parser throws error for user macros invoked with empty argument
While on the topic of Rd macro arguments, it seems that if a multiline argument is supplied, the lines after the first are silently ignored: f <- tempfile() mac6 <- "\\newcommand{\\mac6}{mac6: #1}" cat(mac6, "\\mac6{2*3 2+2 sin(pi) }\n", file = f) rd <- tools::parse_Rd(f) > rd mac6: 2*3 --- Georgi Boshnakov -----Original Message----- From: Tomas Kalibera
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
This is what I have been using. Does anyone have a better way? In particular I would like to see letters in comment strings not stretched so much. Thanks -Frank \documentclass{article} \usepackage{listings,relsize} \lstloadlanguages{R} \newcommand{\lil}[1]{\lstinline|#1|} \begin{document} \lstset{language=R,basicstyle=\smaller,commentstyle=\rmfamily\smaller, showstringspaces=false,%
2005 Jul 19
1
translation with Rd.sty, Sweave and tex4th (PR#8016)
Full_Name: Paulo Ribeiro Version: 2.1-1 OS: Debian Linux Submission from: (NULL) (200.103.144.24) I'm using Sweave with tex4th to generate xhtml documents from documents created using Sweave which include \usepackage{Rd} in the preamble However there seems to be a problem with \Link defined in Rd.sty, since this is also defined in tex4ht.sty My workaround was to replace the lines with
2004 Jul 29
2
expression + paste + arguments + ...
dear R wizards: I would like to write a function that roughly places the equivalent of the following latex text into the current plot: \newcommand{ \placesigma }[4]{ \put(\#1,\#2){ \sigma_{A , #3} = #4 } I cannot figure out how to do this. I know I have to use a function that uses expressions in a text() invoke. But passing arguments and nesting strings and expressions has so far not
2008 Jun 05
2
Creating a list of functions
I've been trying to create a list of function where function[[i]] should actually return the value of i. trying: func <- vector("list",2) i <- 1 while (i <= 2) { func[[i]] <- function() { i } i <- i+1 } however only returned the last value of i for each function. Any help how to achieve the solution intended would be greatly appreciated. thanks in advance, andreas
2008 Jun 13
4
Sweave: looping over mixed R/LaTeX code
Dear guRus, I would like to loop over a medium amount of Sweave code, including both R and LaTeX chunks. Is there any way to do so? As an illustration, can I create a .tex file like this using a loop within a .Rnw file, where the "1,2,3" comes from some iteration variable in R? ################################################ \documentclass{article} \usepackage{Sweave} \begin{document}
2006 Mar 16
2
french secondary boxplot
bonjour, i'm a mathematic teacher and i have a question for R-developers : is it possible to have (in the future) a boxplot with whiskers from the first decile to the ninth decile, as usual in secondary french schools... by example : boxplot(serie,range=-1) for french boxplot ? cordialement, jean-pierre lyc?e jean zay orl?ans, france http://mathazay.free.fr/spip/
2009 Jul 28
4
check for new files in a given directory
I am trying to continuously evaluate online created data files using R-algorithms. Is there any simple way to let R iteratively check for new files in a given directory, load them and process them? Any help would be highly appreciated. Best, A. [[alternative HTML version deleted]]
2009 Jun 19
0
[LLVMdev] How to call C++ code from LLVM
On Thu, Jun 18, 2009 at 3:57 PM, Jules Jacobs<julesjacobs at gmail.com> wrote: > How can I call C++ libraries (LLVM & Qt for example) from a language that's > implemented on top of LLVM? You can call them the same way a C++ file compiled with llvm-g++ would call them. Essentially, it's complicated enough that you probably don't want to do it for any interface of
2009 Jun 18
3
[LLVMdev] How to call C++ code from LLVM
Hi, How can I call C++ libraries (LLVM & Qt for example) from a language that's implemented on top of LLVM? Thanks, Jules -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090619/4621508b/attachment.html>
2002 Nov 13
1
Package documentation and rd.sty
Hi all, I've got a basic question regarding package documentation and rd.sty. I wrote my first own package, and now I would like to place the documentation into the appendix of another LaTex document. Seemingly I cannot simply \usepackage{Rd}, as this will modify the page-settings of my document. Is there a minimum style file which will just define the environments and commands needed for
2007 Nov 28
2
[OT] putting URLs in Latex
Hi R Gurus! This is definitely off topic, but I thought I'd try: what is the way to put in url's into a Latex file, please? I know that you start with a \newcommand statement, with some kind of argument that will change, but I'm not sure how to set it up, please. thanks, Edna Bell