similar to: Newbie help with Sweave

Displaying 20 results from an estimated 2000 matches similar to: "Newbie help with Sweave"

2006 Aug 04
1
Questions about sweave...
Evening all: I'm taking a little time to experiment with R, Sweave, and Miktex/LaTex but I've run up against some problems and -well- I hope that there are some on the list who might have some suggestions. This will be kind of wordy as I will include the complete files involved as I'm just not sure what I'm looking for. Apologies at the outset. I created the source file
2005 Jun 16
1
Sweave and sideways
Hi there, I'm rying to 'turn' an Schunk in an .Rnw file(Xemacs-21.4.13, ESS-5.2.8, R-2.1, miktex-2.4.1705). Has anyone got the isorot package to work with Sweave? JC example test.Rnw: \documentclass[a4paper]{article} \usepackage{Sweave} \usepackage{isorot} \rotdriver{dvips} \clockwise \title{Sweave Example 1} \author{apologies to Friedrich Leisch } \begin{document} \maketitle
2010 Nov 11
4
Troubleshooting sweave
Hi All, I've reproduced the example from Prof. Friedrich Leisch's webpage. When I write sweave("Example-1.Snw") OR sweave("Example-1.Rnw"), (yes, I renamed them). I get the following error: Writing to file example-1.tex Processing code chunks ... 1 : echo term verbatim Error: chunk 1 Error in library(ctest) : there is no package called 'ctest' Also while
2009 Jan 28
0
Sweave problem with greek text
Dear Sweave and R aficionados, I am using R and Latex for many years, writing texts in greek. I tried to combine them with Sweave, but without any success. Could you provide me with any help? Usually my LaTeX files are like this iso-8859-7 encoded .tex file: http://costis.name/0various/lists/R/sweave/successful.greek.tex , which happily produces
2012 Feb 23
1
Sexpr not getting expanded in Sweave
An Sweave file, 'test.Rnw': \documentclass{article} \title{Sweave minimal} \author{MK} \begin{document} \maketitle We try Sweave: <<1>>= data(airquality) summary(airquality) x <- airquality[1, 1] @ I try Sexpr: \Sexpr{x} We plot: \begin{center} <<2, fig=TRUE, echo=FALSE >>= boxplot(Ozone ~ Month, data = airquality) @ \end{center} \end{document} I check the
2010 Dec 22
1
Error in generating sweave-tex -> pdf file
Hi, I created a Sweave file (see below). when I want to convert tex file generated from it into pdf, I get error message as follows: > texi2dvi("test.tex", pdf=TRUE) Error in texi2dvi("test.tex", pdf = TRUE) : Running 'texi2dvi' on 'test.tex' failed. LaTeX errors: ! Undefined control sequence. l.8 \begin {Schunk} ? ! Interruption. !
2005 Aug 05
3
Latex error with Sweave example
I created a tex file following the example in the Sweave help which produced the following files in my working directory. Sweave-test-1-006.eps Sweave-test-1-006.pdf Sweave-test-1-007.eps Sweave-test-1-007.pdf Sweave-test-1.tex When I run latex on this, I get a latex error, log file below. I am running R 2.1.1 on Windows XP. I have installed "small MiKTeX" and I have added
2007 Oct 07
5
how to use \Sexpr{} with sweave
I'm trying to learn Sweave. So far things are going well with the chunks of code identified by << >>= But I'm having trouble with the in-line text use of \Sexpr. Here is a short example .Rnw file: \documentclass[12pt]{article} \usepackage[margin=1.25in]{geometry} \usepackage{graphicx} \usepackage{Sweave} \begin{document} <<test>>= pnorm(1) @ \Sexpr{2+6}
2003 Oct 28
2
formula parsing, using parts ...
I am writing a little abstraction for a series of tests. For example, I am running an anova and kruskal.test on a one-factor model. That isn't a particular problem, I have an interface like: my.function <- function(model,data) { print(deparse(substitute(data))) a <- anova(lm(formula,data)) print(a) if(a$"Pr(>F)"[1] < 0.05) { pairwise.t.test(???) }
2007 Sep 16
1
Identifying objects from a data set
Hello Given the following data for a data set called airquality. To identify the nature of the objects from the data set airquality example "Ozone" would it be best to use the command is. like is.character(airquality$Ozone) ....... I tried attributes(airquality$Ozone) but it came up null. Would there be a better way to identify these objects. Thanking you in advance for your
2017 Jun 26
2
Odd behaviour in within.list() when deleting 2+ variables
>>>>> peter dalgaard <pdalgd at gmail.com> >>>>> on Mon, 26 Jun 2017 13:43:28 +0200 writes: > This seems to be due to changes made by Martin Maechler in > 2008. Presumably this fixed something, but it escapes my > memory. Yes: The change set (svn -c46441) also contains the following NEWS entry BUG FIXES o
2011 Dec 23
2
cast in reshape and reshape2
> library(reshape2) > x = melt(airquality, id=c('month', 'day')) With reshape I can cast with multiple functions: > library(reshape) > cast(x, month+variable~., c(mean,sd)) month variable mean sd 1 5 ozone 23.615385 22.224449 2 5 solar.r 181.296296 115.075499 3 5 wind 11.622581 3.531450 4 5 temp 65.548387
2017 Dec 19
1
lm considers removed predictors when finding complete cases
Dear R-devel list, I realized that removing a predictor in lm through the "-"'s operator in formula() does not affect the complete cases that are considered. A minimal example is: summary(lm(Wind ~ ., data = airquality)) # 42 observations deleted due to missingness summary(lm(Wind ~ . - Ozone, data = airquality)) # still 42 observations deleted due to missingness, even if only 7
2004 Feb 19
1
latex problem with Sweave output file under Debian
Could someone tell me how to end the trouble I'm encountering when running latex on the .tex file produced by Sweave()? Sweave() seems to process the example file (http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw) without problems, and the file example-1.tex produced is the same as in the Sweave manual. However, when I run latex on example-1.tex, many error messages and requests for
2012 Jan 06
1
Please help!! How do I set graphical parameters for ploting ctree()
I'm trying to understand how to set graphical parameters for trees created with the party package.  For example take the following code:   library(party)     data(airquality)     airq <- subset(airquality, !is.na(Ozone))     airct <- ctree(Ozone ~ ., data = airq,                    controls = ctree_control(maxsurrogate = 3))     plot(airct)   My problem is, I've got a ctree that has
2017 Jun 21
0
selecting dataframe columns based on substring of col name(s)
> On Jun 21, 2017, at 9:11 AM, Evan Cooch <evan.cooch at gmail.com> wrote: > > Suppose I have the following sort of dataframe, where each column name has a common structure: prefix, followed by a number (for this example, col1, col2, col3 and col4): > > d = data.frame( col1=runif(10), col2=runif(10), col3=runif(10),col4=runif(10)) > > What I haven't been able to
2008 Dec 23
3
Using transform to add a date column to a dataframe
I would like to add a column to the airquality dataset that contains the date 1950-01-01 in each row. This method does not appear to work: > attach(airquality) > data1 <- transform(airquality,Date=as.Date("1950-01-01")) Error in data.frame(list(Ozone = c(41L, 36L, 12L, 18L, NA, 28L, 23L, 19L, : arguments imply differing number of rows: 153, 1 I can't decipher what
2010 May 04
1
randomforests - how to classify
Hi, I'm experimenting with random forests and want to perform a binary classification task. I've tried some of the sample codes in the help files and things run, but I get a message to the effect 'you don't have very many unique values in the target - are you sure you want to do regression?' (sorry, don't know exact message but r is busy now so can't check). In
2005 Jul 01
2
Simple indexing conundrum
My apologies in advance for my thickness but I can't seem to solve the following, seemingly simple, data manipulation problem: I have a data frame that contains multiple factors and multiple continuous response variables, but duplicates of some factor combinations. The duplicates contain bad data, so I would like to eliminate the duplicates. I would like to retain the entire rows
2018 Dec 12
2
Subset dentro de un for
Gracias a los tres, Raúl, Marcelino y Carlos. Lo del "get" de Marcelino me da la respuesta a lo que yo exactamente preguntaba, y funciona, pero ahora tengo problemas con el for, por lo que probablemente recurra al eval parse de Raúl o Carlos, que ya tienen el for. Aún así, lo intento 1º con el get. Con subset(df, subset=get(GT[i])>0) el problema es que en el for hago un