Displaying 20 results from an estimated 1100 matches similar to: "input line length in Sweave"
2011 Nov 29
1
hour in x-axis
Dear R useres, got the following problem. Given the AggData (listed below)
I need to plot AggData[,2] vs time (AggData[,1]) for chosen 'rows'. Ive done
already:
plot(AggData[rows,2], xaxt='n')
axis(1,at=seq(1,length(rows),1),sub("","", AggData[rows,1]))
which works, but I need to list only chosen data points, say full hours or
every 60th point, something like:
2005 Mar 10
1
contrast matrix for aov
How do we specify a contrast interaction matrix for an ANOVA model?
We have a two-factor, repeated measures design, with
Cue Direction (2) x Brain Hemisphere(2)
Each of these has 2 levels, 'left' and 'right', so it's a simple 2x2 design
matrix. We have 8 subjects in each cell (a balanced design) and we want to
specify the interaction contrast so that:
CueLeft>CueRght
2008 Jul 27
2
Colors in Sweave
Hi list,
I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including:
===
\usepackage[usenames]{colors}
\definecolor{darkred}{rgb}{0.545,0,0}
\definecolor{midnightblue}{rgb}{0.098,0.098,0.439}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,formatcom={\color{midnightblue}}}
2003 Dec 17
1
repeated measures aov problem
Hi all,
I have a strange problem and rigth now I can't figure out a
solution.
Trying to calculate an ANOVA with one between subject factor (group)
and one within (hemisphere). My dependent variable is source
localization (data). My N = 25.
My data.frame looks like this:
> ML.dist.stack
subj group hemisphere data
1 1 tin left 0.7460840
2 2 tin left
2006 Feb 08
1
ERROR: no applicable method for "TukeyHSD"
Why do I see this error?
> library(stats)
> require(stats)
[1] TRUE
>
> tHSD <- TukeyHSD(aov)
Error in TukeyHSD(aov) : no applicable method for "TukeyHSD"
In case it helps:
> aov
Call:
aov(formula = roi ~ (Cue * Hemisphere) + Error(Subject/(Cue *
Hemisphere)), data = roiDataframe)
Grand Mean: 8.195069
Stratum 1: Subject
Terms:
Residuals
Sum
2008 Nov 05
1
Problems computing 2-way-mixed-model ANOVA
Dear Experts,
I am new to R and unfortunately cannot start with a simply statistical
analysis:
I manually determined the volume of the right and left hippocampus in
a group of meditators and in a group of controls. My data-sheet looks
as follows:
observation subject group age gender hemisphere volume
1 am04 m 25 f left 3.637
2 am04 m 25 f right 3.713
3 ao08 m 47 m left 3.715
4 ao08 m 47
2006 Jul 17
2
planned comparisons for ANOVA
Hi,
we need some help to define planned comparisons. I've based my
understanding of the problem on reading Tabachnick and Fidell (2006),
ie:
http://www.ablongman.com/catalog/academic/product/0,1144,0205459382,00.html
I don't understand how to specify planned comparisons in R. I've not
found explanations for this in MASS or elsewhere. There is only
discussion of the contrast
2005 Sep 08
1
Setting width in batch mode
As instructed, I have spent a long time searching the web for an answer
to this question.
I am trying to use Sweave to produce lecture slides, and have the
problem that I can't control the formatting of my R source. Setting
options(width), as recommended in this forum, works fine on the R
_output_, but seems to have unpredictable effects on the echoing of the
source code.
If I try setting
2005 Jan 26
2
problems building R-patched
When I try to install R-patched of January 26 on my linux (fedora core 1, with openmosix kernel) box, make fails in the first recommended package with the message
tkStartGUI text html latex
tkpager text html latex
make[2]: Leaving directory `/home/setzer/newstuff/R-patched/src/library'
make[2]: Entering directory
2010 Oct 05
3
SweaveInput + keep.source = TRUE trouble
Dear all,
I have trouble with R-beta sweaving files that include definitions with
\SweaveInput in combination with keep.source = TRUE
Symptom:
SInput is taken from too far down the input file (the shift is the number of
lines of the included file). Is that known? Searching didn't turn up anything,
yet I think there are more people than just me using keep.source.
Example:
$
2010 Aug 24
4
how to plot y-axis on the right of x-axis
Dear List,
I have a richness data distributing across 20 N to 20 S latitude. (120 E-140
E longitude).
I would like to draw the richness in the north hemisphere and a regression
line in the plot
(x-axis: latitude, y-axis: richness in the north hemisphere).
The above demand is done using plot.
Then, south hemisphere richness and regression are required to be generated
using
the same y-axis above
2007 Jun 24
2
ANOVA non-sphericity test and corrections (eg, Greenhouse-Geisser)
I'm an experimental psychologist and when I run ANOVA analysis in
SPSS, I normally ask for a test of non-sphericity (Box's M-test). I
also ask for output of the corrections for non-sphericity, such as
Greenhouse-Geisser and Huhn-Feldt. These tests and correction factors
are commonly used in the journals for experimental and other
psychology reports. I have been switching from SPSS to R
2013 Feb 09
1
Swaeve, Beamer and \alt
Hi,
I am having trouble getting \alt (or \altenv) to work with
Schunk/Sinput and was wondering if anybody had had success? With the
slide
\begin{frame}[fragile]\frametitle{Basic R}
\alt<2>{
<<echo=TRUE>>=
2+2
@
}{
<<echo=TRUE, eval=FALSE>>=
2+2
@
}
\end{frame}
I get the error message:
! FancyVerb Error:
Extraneous input `> 2+2 \end {Sinput} \end
2010 Aug 04
1
Problem using R and Beamer...
Dear [R] and beamer community,
I am trying to build a presentation using beamer and [R]. I can Sweave the file; however, when I run pdflatex on the file i get the following error:
! FancyVerb Error:
Extraneous input `> a = 123450 > b = -0.69 \end {Sinput} \end {Schunk} \end {
beamer at frameslide}\ifbeamer at twoscreenstext \beamer at dosecondscreennow {{fragile}
\frametitle
2010 Dec 14
0
Sweave problem: lines repeated
Hi all
I'm having a problem when using Sweave. Here is a minimal example.
My input file (eg, test.Snw) looks like this:
<<TESTME,echo=FALSE, results=hide,fig=FALSE,keep.source=TRUE>>=
data(cars)
m1 <- lm( dist~speed, data=cars ); coef( m1 )
@
<<echo=TRUE,results=verbatim,fig=FALSE,keep.source=TRUE>>=
<<TESTME>>
@
<<TESTME2,echo=FALSE,
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
2003 Feb 11
3
Problems with Rcmd check on Win 2000 & rw1062
When I run Rcmd check on a package on my Windows 2000 machine, I get a
series of error messages like the following:
* checking generic/method consistency ...c:\DOCUME~1\R5018~1.WOO\LOCALS~1\Temp/R
utils138414013: cannot open c:DOCUME~1R5018~1.WOOLOCALS~1Temp/Rin138408157: no s
uch file
It looks as if a Windows style path to the temp directory is not being interpreted correctly, with backslashes
2003 Apr 04
3
creating function bodies using body()
I'm having trouble figuring out how to create a function using "body<-"
(). The help file for body() says that the argument should be a list of
R expressions. However if I try that I get an error:
> tmpfun <- function(a, b=2){}
> body(tmpfun) <- list(expression(z <- a + b),expression(z^2))
Error in as.function.default(c(formals(f), value), envir) :
2013 Jan 29
1
Sweave files generating miktex errors
Dear useRs--
I have been using Sweave with miktex for years, but on a new install on
Windows XP, miktex seems to be hung up on single quotes. See example below.
Digging through stackexchange, I found using \usepackage[noae]{Sweave} in
the tex file solved the problem. My questions are:
--Why would this happen? I have the ae package installed.
--If inserting [noae] is the solution, how do I
2006 Mar 31
1
mutual information for two time series
Hi I hope this is going to the right place. I am trying to write a program
which uses KernSmooth library to estimate mutual information between two
time series at various different lags. At the moment it’s producing negative
values, which is supposed to be impossible (something is fishy). I am
summing across one row of the matrix to get p(value is in bin x) and summing
across the columns to get