similar to: Sweave rendering of simple character

Displaying 20 results from an estimated 1000 matches similar to: "Sweave rendering of simple character"

2007 Mar 11
1
using scan to record user's input
I'm using scan in a script to record a series of responses of the user as a function of some graphs that I put up on the screen. A toy version would be, y <- rep(NA, 3) for (ix in seq( length(y) ) ) { y[ix] <- scan( n = 1 ) } However, if I include any code after this loop, for example, y <- rep(NA, 3) for (ix in seq( length(y) ) ) { y[ix] <- scan( n = 1 ) } y I get an error
2007 Mar 17
1
problem with mfg argument of par
I'm having a problem with the mfg option of par. Am I making an error in my usage? Here is a simple example that I thought would plot to the 4 corners of a 2x2 plot but doesn't plot to the lower right and plots twice on the upper left. par(mfrow = c(2, 2)) pos <- as.matrix(expand.grid(1:2, 1:2)) for (ix in 4:1) { par(mfg = pos[ix, ]) plot(1:5) } Thank you in advance. R version
2008 Oct 16
1
packages in Depends field and NAMESPACES
Must packages in the Depends field of the DESCRIPTION file have NAMESPACES? I haven't seen this explicitly indicated anywhere. I am writing a small package and find that when I add the abind package to the list of the Depends field, I get an error in R CMD check of the build. * checking package name space information ... OK * checking package dependencies ... ERROR Packages required but not
2008 Sep 09
1
puzzle about contrasts
Hi, I'm trying to redefine the contrasts for a linear model. With a 2 level factor, x, with levels A and B, a two level factor outputs A and B - A from an lm fit, say lm(y ~ x). I would like to set the contrasts so that the coefficients output are -0.5 (A + B) and B - A, but I can't get the sign correct for the first coefficient (Intercept). Here is a toy example, set.seed(12161952) y
2007 Sep 03
3
plotting predicted curves with log scale in lattice
Hi, I was taken off guard by the following behavior in a lattice plot. I frequently want to add a predicted curve defined at more points than in the formula expression of xyplot. There have been numerous examples of how to do this on r-help, but I still often struggle to make this work. I just realized that specifying one of the axes on a log scale does not guarantee that the added data for a
2007 May 29
0
new packages psyphy and MLDS
New packages psyphy and MLDS are available on CRAN: psyphy ncludes an assortment of functions useful in analyzing data from pyschophysical experiments. It includes functions for calculating d' from several different experimental designs, links for mafc to be used with the binomial family in glm (and possibly other contexts) and selfStart functions for estimating gamma values
2007 May 29
0
new packages psyphy and MLDS
New packages psyphy and MLDS are available on CRAN: psyphy ncludes an assortment of functions useful in analyzing data from pyschophysical experiments. It includes functions for calculating d' from several different experimental designs, links for mafc to be used with the binomial family in glm (and possibly other contexts) and selfStart functions for estimating gamma values
2010 Feb 11
1
Sweave, lty = 3 line incorect in pdf output
I'm having a problem with dotted lines (lty = 3) in the pdf output in documents generated with Sweave. In the displayed pdf, the dotted line does not show up and in the printed output, it is there but does not seem to respect the lwd argument, for example, it is very faint despite using lwd = 3. The dotted line is correct in a quartz window and if I save the Quartz window to a pdf and
2006 Nov 18
1
deriv when one term is indexed
Hi, I'm fitting a standard nonlinear model to the luminances measured from the red, green and blue guns of a TV display, using nls. The call is: dd.nls <- nls(Lum ~ Blev + beta[Gun] * GL^gamm, data = dd, start = st) where st was initally estimated using optim() st $Blev [1] -0.06551802 $beta [1] 1.509686e-05 4.555250e-05 7.322720e-06 $gamm [1] 2.511870 This works fine but I
2006 May 18
1
adding grid lines to an xyplot when there is only 1 panel - corrected
Sorry, some things got garbled in that request for help that might make my request unintelligible, probably it being too late at night when I posted, here is the corrected function call for which I would like to learn how to add horizontal grid lines. Any suggestions would be appreciated. Apologies for the posting error xyplot(est ~ STE, data = all, groups = AREA, type = "b",
2005 Sep 08
1
FW: Re: Doubt about nested aov output
Your response nicely clarifies a question that I've had for a long time, but which I've dealt with by giving each subject a unique label. Unless I'm missing something, both techniques should work as the toy example below gives exactly the same output in all 3 cases below (forgetting about the convergence problem). Would there be a reason to prefer labeling the levels one way or
2009 Dec 08
4
lower.tail option in pnorm
Hi, I would have thought that these two constructions would produce the same result but they do not. Resp <- rbinom(10, 1, 0.5) Stim <- rep(0:1, 5) mm <- model.matrix(~ Stim) Xb <- mm %*% c(0, 1) ifelse(Resp, log(pnorm(Xb)), log(1 - pnorm(Xb))) pnorm(as.vector(Xb), lower.tail = Resp, log.p = TRUE) > ifelse(Resp, log(pnorm(Xb)), log(1 - pnorm(Xb))) [1] -0.6931472 -1.8410216
2003 Nov 05
2
Multiple comparisons with a glm
I've never seen anything written about multiple comparisons, as in the multcomp package or with TukeyHSD, but using a glm. Do such procedures exist? Are they sensible? Are there any packages in R that implement such comparisons? Thank you. -- Ken Knoblauch Inserm U371 Cerveau et Vision 18 avenue du Doyen Lepine 69675 Bron cedex France Tel: +33 (0)4 72 91 34 77 Fax: +33 (0)4 72 91 34 61
2012 Mar 17
1
parApply vs parCapply
I've started to use the parallel package and it works very well speeding things up. Thank you for making this easy to do. Should I have expected that parCapply would return a vector when parApply returns a matrix? library(parallel) x <- matrix(rnorm(8), nc = 2) apply(x, 2, function(y) y) [,1] [,2] [1,] -0.9649685 0.91339851 [2,] -1.4313140 0.13457671 [3,] 1.0499248
2010 Mar 06
0
thin grid lines, again (FAQ 7.36), a proposal
Hi, I'm raising the issue, again, of those pesky thin lines that show up with a pdf graphics device, otherwise known as FAQ 7.36. I have read the FAQ and understand that I can eliminate them by adjusting the anti-aliasing option for viewing them on the screen, but this doesn't necessarily eliminate them for a print device or for transferring them into a powerpoint or similar type of
2010 Jan 27
1
term.formula error when updating an nls object
Hi, I'm getting an error that I don't understand when updating an nls object. Here is a toy example. dd <- structure(list(Contrast = c(0.00376, 0.03759, 0.12782, 0.25564, 0.50376, 1), Response = c(0.29915, 6.13248, 29.01709, 30.0641, 29.46581, 27.67094)), .Names = c("Contrast", "Response"), class = "data.frame", row.names = c(NA, -6L)) m1 <-
2009 Aug 20
0
Sweave truncation
Peter Thank you for the information. I accidentally deleted Ken's post without having read it. Ken' s thought is great but as you said awful to implement I thought that capture.output would come in handy some time when I first saw it on an unrelated reply. Just thought :- the latex listings package may have alternatives If I remember correctly it has wrapping and other goodies but I
2009 Jun 16
1
overshoot of formula line in summary output of Sweave
Hi, In the Sweave output for summary for several types of model objects and also for the comparison of models with anova, I find that that the display of the call(s) or formula does not obey the width option, even with keep.source=TRUE set, so that a long formula will overshoot the margins in the document. I would like to know if there is a good way to correct that. Looking at the print.summary
2023 Jan 28
1
lines through points in lattice legend
On Sat, Jan 28, 2023 at 2:49 PM Kenneth Knoblauch <ken.knoblauch at inserm.fr> wrote: > > Hi, > > I'm struggling to find if there is a simple way to make the lines and points overlap in a legend for a lattice plot using auto.key. Here is a toy example of what doesn't work (for me) as the lines and points are adjacent rather than overlapping: > > library(lattice)
2009 Feb 26
1
using predict method with an offset
Hi, I have run into another problem using offsets, this time with the predict function, where there seems to be a contradiction again between the behavior and the help page. On the man page for predict.lm, it says Offsets specified by offset in the fit by lm will not be included in predictions, whereas those specified by an offset term in the formula will be. While it indicates nothings about