similar to: Sweave special token \\ from R to latex

Displaying 20 results from an estimated 5000 matches similar to: "Sweave special token \\ from R to latex"

2008 Mar 11
2
R-Latex question
Hi, maybe my question is not typical. I want to make R table-kind output to be readable immediately in Latex but I am struggling with symbol '\' needed for instance in '\hline'. For example when 'Table' is a matrix class object: cat("&",Table[1,1], "&",Table[1,2], "\n");flush.console() cat("\hline \n");flush.console()
1999 Sep 01
1
Using R-0.65.0 under ESS on Unix
There is a bug in the command-line handling of 0.65.0 under Unix that may affect some users of R-inferior-mode under ESS, as that sets --no-readline as the first argument, and any arguments after that are ignored. The fix is simple: delete line 448 of src/unix/sys-common.c (`break;') and re-compile. The most used arguments are (I'm told) --vsize and --nsize. I find it more convenient to
2002 Jul 17
1
editing Sweave files in xemacs with ess (noweb), auctex and reftex
I am having some trouble getting reftex, in particular the bibtex related features, to work properly in xemacs when editing text in Sweave files. I have added (defun Rnw-mode () (noweb-mode) (if (fboundp 'R-mode) (setq noweb-default-code-mode 'R-mode))) (add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode)) (add-to-list 'auto-mode-alist
2006 Apr 06
4
weighted kernel density estimate
Dear R-users, I intend to do a spatial analysis on the genetic structuring within a population. For this I had thought to prepare a kernel density estimate map showing the spatial distribution of individuals, while incorporating the genetic distances among individuals. I have a dataset of locations of N unique individuals (XY-coordinates) and an NxN matrix with the genetic distances given as a
2005 Feb 15
3
using poly in a linear regression in the presence of NA f ails (despite subsetting them out)
This smells like a bug to me. The error is triggered by the line: variables <- eval(predvars, data, env) inside model.frame.default(). At that point, na.action has not been applied, so poly() ended being called on data that still contains missing values. The qr() that issued the error is for generating the orthogonal basis when evaluating poly(), not for fitting the linear model itself.
2005 Feb 15
3
using poly in a linear regression in the presence of NA f ails (despite subsetting them out)
This smells like a bug to me. The error is triggered by the line: variables <- eval(predvars, data, env) inside model.frame.default(). At that point, na.action has not been applied, so poly() ended being called on data that still contains missing values. The qr() that issued the error is for generating the orthogonal basis when evaluating poly(), not for fitting the linear model itself.
2006 Oct 11
2
pinning R packages to unstable?
Dear Debian R users, This is more of an apt question rather than R. I have a testing Debian system, but would like to use the unstable packages for R, *without* using the -t flag in apt-get. I think this is done by using a 'pin' rule in /etc/apt/apt.conf, but don't understand how this should be done. Can somebody provide an example please? Cheers, -- Seb
2007 Jun 13
2
Fitted Value Pareto Distribution
I would like to fit a Pareto Distribution and I am using the following codes. I thought the fitted (fit1) should be the fitted value for the data, is it correct? As the result of the "fitted" turns out to be a single value for all. fit=vglm(ycf1 ~ 1, pareto1(location=alpha), trace=TRUE, crit="c") fitted(fit) The result is fitted(fit) [,1] [1,] 0.07752694
2005 Feb 05
2
Std Err on Concentration measures
Hi, I'm using the ineq package to calculate some concentration measures (Gini, Herfindal, ...) and I was wondering if there's around also a function to calculate standard error on these measures. If not, is anybody aware of where I can find a reference on this point? Thanks. -- ======================================================== Angelo Secchi PGP Key ID:EA280337
2005 Jun 29
1
poly() in lm() leads to wrong coefficients (but correct residuals)
Dear all, I am using poly() in lm() in the following form. 1> DelsDPWOS.lm3 <- lm(DelsPDWOS[,1] ~ poly(DelsPDWOS[,4],3)) 2> DelsDPWOS.I.lm3 <- lm(DelsPDWOS[,1] ~ poly(I(DelsPDWOS[,4]),3)) 3> DelsDPWOS.2.lm3 <- lm(DelsPDWOS[,1]~DelsPDWOS[,4]+I(DelsPDWOS[,4]^2)+I(DelsPDWOS[,4]^3)) 1 and 2 lead to identical but wrong results. 3 is correct. Surprisingly (to me) the residuals
2005 Mar 24
2
Problem loading library Design
I have used library Design (Frank Harrell) in the past but when I tried this week, I get : > library(Design) Error in eval(expr, envir, enclos) : Object "formula.default" not found I updated to the latest version of the library (2.0) with the same result. My version of R may not be the latest but it's recent (and I probably changed since using Design for the last time) :
2005 Aug 03
2
using weighted.mean with tapply()
I am trying to calculate the weighted mean for a of 10 deciles and I get an error: > decile <- tapply(X=mat$trt1m, INDEX=mat$Rank, FUN=weighted.mean, w=mat$mcap) Error in FUN(X[[1]], ...) : 'x' and 'w' must have the same length All three of my inputs have the same length, as shown below, and the weighted.mean calculation works by itself, just not in tapply() >
2006 Sep 20
2
Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)
Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file: \documentclass[10pt]{article} \begin{document} This line should print '2': \Sexpr{1 + 1} %% This line should NOT print '2': \Sexpr{1 + 1} \end{document} The \Sexpr in the second line is processed even though the
2006 Sep 20
2
Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)
Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file: \documentclass[10pt]{article} \begin{document} This line should print '2': \Sexpr{1 + 1} %% This line should NOT print '2': \Sexpr{1 + 1} \end{document} The \Sexpr in the second line is processed even though the
2007 Jan 06
1
help with gls
Hello R-users, I am using gls function in R to fit a model with certain correlation structure. The medol as: fit.a<-gls(y~1,data=test.data,correlation=corAR1(form=~1|aa),method="ML") mu<-summary(fit.a)$coefficient With the toy data I made to test, the estimate of mu is exactly equal to the overall mean of y which can not be true. But, if I make a toy data with y more than two
2002 May 20
1
suggestion for example for base:naresid
Dear list: since it took me a little while to figure out how to make use of naresid, I thought that the below R code might be useful as an example on the help page. Regards, Markus # generate some data x1 <- runif(20) y <- 10 + 5*x1 + rnorm(20) summary(lm.0 <- lm(y ~ x1)) # append some NA's to y y <- c(y, rep(NA, 5)) # generate some further x1s x1 <- c(x1, runif(5)) #
2001 Aug 29
1
suggestion for example for base:naresid
Dear list: since it took me a little while to figure out how to make use of naresid, I thought that the below R code might be useful as an example on the help page. Regards, Markus # generate some data x1 <- runif(20) y <- 10 + 5*x1 + rnorm(20) summary(lm.0 <- lm(y ~ x1)) # append some NA's to y y <- c(y, rep(NA, 5)) # generate some further x1s x1 <- c(x1, runif(5)) #
2006 Sep 21
2
Sweave processes \Sexpr in commented LaTeX source
Marc, >I have a large .Rnw file and was in the process of doing some debugging. >I had set some R chunks to 'eval=false' in the process. This resulted in >some R objects not being created that were in turn used in the >subsequent \Sexpr's. I have often the same problem, I'm using a construct like : <<eval=F>>= x <- rnorm(100) @ I have
2010 Nov 16
1
Sweave: \Sexpr and variables with special chars
I am using \Sexpr to include a variable in a title of a Sweave document: \documentclass[a4paper]{article} <<echo=false, results=hide>>= #mytitlevar <- "Stuff" # case 1, everything is find mytitlevar <- "Stuff_first" # case 2, f is turned into sub-text @ \title{MyTitle: \\ \Sexpr{mytitlevar} } \begin{document} \maketitle \end{document} When doing this, the
2009 Jan 06
2
Sweave in LATEX
Hello I have been setting up my computer to run Sweave. I have got the whole thing working on example files, except that my MikTex returns an "Undefined Control Sequence" error for \Sexpr and my output file contains verbatim code sequences at the apropriate point in the text rather than the R output. The rest of the output file is fine with tables, R code sequences and figures in the