similar to: Sweave: include a multi-page-pdf plot

Displaying 20 results from an estimated 10000 matches similar to: "Sweave: include a multi-page-pdf plot"

2011 Oct 18
1
cygwing warming when creating a package in windows
Dear All, I am a beginner creating R packages. I followed the Leisch (2009) tutorial and the document ?Writing R Extensions? to write an example. I installed R 2.12.2 (I also tried R2.13.2), the last version of Rtools and the recommended packages in a PC with Windows 7 Home Premium. I can run R CMD INSTALL linmod in the command prompt and the R CMD check linmod. The following outputs are
2013 Mar 12
1
Cook's distance
Dear useRs, I have some trouble with the calculation of Cook's distance in R. The formula for Cook's distance can be found for example here: http://en.wikipedia.org/wiki/Cook%27s_distance I tried to apply it in R: > y <- (1:400)^2 > x <- 1:100 > lm(y~x) -> linmod # just for the sake of a simple example >
2009 Oct 26
2
What is the most efficient practice to develop an R package?
I am reading Section 5 and 6 of http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf It seems that I have to do the following two steps in order to make an R package. But when I am testing these package, these two steps will run many times, which may take a lot of time. So when I still develop the package, shall I always source('linmod.R') to test it. Once the code in
2010 Apr 27
3
Problem calculating multiple regressions on a data frame.
Hi there, I am stuck trying to solve what should be a fairly easy problem. I have a data frame that essentially consists of (ID, time as seqMonth, variable, value) and i want to find the regression coefficient of value vs time for each combination of ID and Variable. I have tried several approaches and none of them seems to work as i expected. For example, i have tried:
2006 Jan 11
1
updating formula inside function
Dear R-Helpers Given a function like foo <- function(data,var1,var2,var3) { f <- formula(paste(var1,'~',paste(var2,var3,sep='+'),sep='')) linmod <- lm(f) return(linmod) } By typing foo(mydata,'a','b','c') I get the result of the linear model a~b+c. How can I rewrite the function so that the formula can be updated inside the function,
2010 Jun 18
1
How to calculate the robust standard error of the dependent variable
Hi, folks linmod=y~x+z summary(linmod) The summary of linmod shows the standard error of the coefficients. How can we get the sd of y and the robust standard errors in R? Thanks! [[alternative HTML version deleted]]
2010 Jun 21
2
How to predict the mean and variance of the dependent variable after regression
Hi, folks, As seen in the following codes: x1=rlnorm(10) x2=rlnorm(10,mean=2) y=rlnorm(10,mean=10)### Fake dataset linmod=lm(log(y)~log(x1)+log(x2)) After the regression, I would like to know the mean of y. Since log(y) is normal and y is lognormal, I need to know the mean and variance of log(y) first. I tried mean (y) and mean(linmod), but either one is what I want. Any tips? Thanks in
2010 Jun 30
1
Sweave PDF files show plot symbols as "q"
I'm guessing this is a FAQ but I can't find it and that it is probably not exclusive R related but relevant so I thought I'd ask: When I view the PDF output from Sweave (e.g. Example 1 from the author's web site at [1]) on a Linux system using the standard PDF viewer [2], the circles for the outliers in the plot [boxplot(Ozone ~ Month, data = airquality)] show up as the letter
2009 Sep 14
3
Eliminate cases in a subset of a dataframe
Hi folks, I created a subset of a dataframe (i.e., selected only men): subdata <- subset(data,data$gender==1) After a residual diagnostic of a regression analysis, I detected three outliers: linmod <- lm(y ~ x, data=subdata) plot(linmod) Say, the cases 11,22, and 33 were outliers. Here comes the problem: When I want to exclude these three cases in a further regression analysis, - for
2012 May 29
2
setting parameters equal in lm
Forgive me if this is a trivial question, but I couldn't find it an answer in former forums. I'm trying to reproduce some SAS results where they set two parameters equal. For example: y = b1X1 + b2X2 + b1X3 Notice that the variables X1 and X3 both have the same slope and the intercept has been removed. How do I get an estimate of this regression model? I know how to remove the intercept
2008 Feb 25
3
Whitespace in img src
Hello, markdown (Python implementation) seems to render: ![alternativer text](pfad/und/eine lange/url zum bild.jpg) to <img src="pfad/und/eine" title="lange/url zum bild.jpg" alt="alternativer text"/> breaking the URL at the whitespace. AFAIK whitespaces are ok in URLs so why is it breaking up the URL here? Thanks, Florian -- I'm using an
2008 Mar 10
3
Weighting data when running regressions
Dear R-Help, I'm new to R and struggling with weighting data when I run regression. I've tried to use search to solve my problem but haven't found anything helpful so far. I (successfully) import data from SPSS (15) and try to run a linear regression on a subset of my data file where WEIGHT is the name of my weighting variable (numeric), e.g.: library(foreign)
2012 May 02
1
rgl.Sweave not producing transparency in pdf plots with alpha
Hi Folks, I'm trying to get rgl.Sweave to produce plots with transparency. However, it just seems to produce opaque plots when pdf is the output type. Perhaps this is a known issue? I'll just use .png in the meantime, but wanted to see about this, as I didn't see it in the documentation (though it's possible I missed it). Thanks, Allie \documentclass{article} \title {rgl
2012 Nov 16
2
grant windows group share permission
Hello i like to give a windows group (W2K3-AD) permissions to use a share read/write on a Samba domain member server. Therefore if have added the Samba server to the domain without problem and created a share like this: [bild] comment = Some Comment path = /data/bild admin users = root force user = smbuser force group = sambashare valid users = DOMAIN\w-user1
2007 Jul 09
0
Problem with Sweave and pdf version 1.4
Dear useRs, I'm trying to use ggplot2 in Sweave (R 2.5.1). The plots use the alpha channel, so I need to use pdf version 1.4. Search the mailinglist archive I found two solutions: \SweaveOpts{echo = FALSE, pdf.version=1.4} and explicit writing to a pdf 1.4 file. The latter works but the first doesn't. Probably I'm doing something wrong (see the Rnw file below). The file tmp_tmp.pdf is
2003 Dec 04
2
passing par() options to pdf under Sweave
I'm using Sweave to generate LaTeX output from R. Thank-you very much for this capability. It is very useful. Could someone please tell me how to pass non-default graphics parameters from par() to the pdf driver when it is called by Sweave? (I need to change some of the margin defaults. ) Hoping there is an easy solution to this question, Anne York
2012 Sep 14
1
Printing localized pdf file from Sweave snippets
Hello! I am struggling for quite some time with proper printing of local characters in pdf plot, via Sweave snippets in Rnw file. When I am working directly within R, all is fine and I can get local character properly, like: pdf('figs/fig-relativeEntropy0.pdf', h=6, w=6, encoding='CP1250') matplot(par[, c(3)], type='b', ylim=c(0,0.5), xaxt='n', pch=c(21),
2008 Jun 27
1
Sweave: controlling pointsize (pdf)
Hello, Is there a way to control pointsize of pdf:s produced by Sweave? I would like to have the same pointsize from (not a working example) pdf(file="C:/temp/example.pdf", width=7, height=7, bg="white", pointsize=10) plot(1:10) etc.. dev.off() as \documentclass[a4paper]{article} \usepackage[latin1]{inputenc} \usepackage[finnish]{babel} \usepackage[T1]{fontenc}
2011 Aug 04
1
Sweave: pdf-graphics got three times lager with R 2.13.1
Dear R-Users, I am using R for years now but recently I encounter a problem with the pdf-size of graphics generated with sweave. However, I am new in this forum. Hence, please don't hesitate if I am wrong here. I use a script which runs perfectly in R 2.11.1 and the pdf-size of the graphs is about 3 KB. Running the same script with R 2.13.1 the file size increases to 12 KB. I am using about
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