similar to: Two questions

Displaying 20 results from an estimated 10000 matches similar to: "Two questions"

2004 May 06
1
Printing ps pictures with transparent b'ground
Hi all I wish to create a ps file of a picture produced in R. With my limited R, I see two ways: 1. Print direct to the postscript device 2. Print to the screen, and save to ps using dev.print. I want a white (not transparent) background. Option 1 above works fine, but 2 does not: even when I say I want a white background, I get transparent; perhaps I misread the help files. Here's some R
2003 Jul 29
1
Sweave: pass scale parameter to includegraphics?
Hi all I'm using Sweave and find it a treat. But one question: I use Sweave to create my pictures which are automatically included into LaTeX. For example, in the file test.Snw, I may have: % LaTeX stuff \begin{figure} <<fig=true,width=5,height=5>>= x1 <- seq(1,5, length=10) x2 <- sin(x1) plot(x1,x2) @ \caption{Plot} \end{figure} % More LaTeX This produces the LaTeX
2003 Mar 19
3
The best way to end up with WMF files
Hi all I am doing some stats work for a group of biologists who require windows metafiles (*.wmf) for their publications. To create these, I appear to have two choices: 1. Restart my machine in Windows and use savePlot 2. Keep my machine in linux, save as another format, then convert. I'd rather stay in linux; but how do I get wmf files? I looked at using ImageMagick's convert,
2004 Mar 29
1
White background in PS pictures
Hi all I am using R to produce postscript pictures via the postscript command. I have never had any problems... until now, when I want to inlcude my .ps file is a LaTeX document *without* a white background. (If it's important, I'm using the prosper class with the whitecross option, so the background in blue.) I would like my .ps file to have a white background. If I read the help
2003 Mar 21
1
The best way to end up with TIFF {Was: end up with WMF)
Hi all I posted a couple of days ago about how to end up with wmf files eventually in R for linux. The short answer was: you (probably) can't...and don't! The journal in question also accepts TIFF files, I am told (it's a physiology journal). So I adjust my question: What is the best way to get TIFF files out of R? It can't create them directly as far as I can tell.
2003 Jul 28
1
Plotting (mixed) line types and legends
Hi all I have a question about plotting line types and legends. Here's a short piece of code to demonstrate: x <- y <- seq(1,10) plot(x,y, type ="l", lty="33") lines(x,y+1, lty=1) legend( 8,2,legend=c("lty=1","lty=\"33\""), lty=c(1,"33") ) On my system (see below), the line types in the legend are not the same as in the
2006 Aug 31
1
NaN when using dffits, stemming from lm.influence call
Hi all I'm getting a NaN returned on using dffits, as explained below. To me, there seems no obvious (or non-obvious reason for that matter) reason why a NaN appears. Before I start digging further, can anyone see why dffits might be failing? Is there a problem with the data? Consider: # Load data dep <-
2002 Dec 16
1
Creating libraries: Cannot make help
Hi all I am trying to package a library in R 1.6.1 (Windoze XP). I have read the document "Writing R extensions" and think I have done things correctly (though apparently not). I have searched the mail archives for help to no avail. I also posted a few days ago and thanks to Peter Dalgaard I have managed to focus my search for errors. I am trying to create a library in R. I run the
2004 Jun 22
1
Using xtable with summaries of lm objects
Hi all Suppose I do the following: set.seed(1000) library(xtable) x <- runif( 10 ) y <- 1 + 2*x + rnorm( length(x) ) test.lm <- lm( y ~ x ) summary( test.lm ) xtable ( summary( test.lm ) ) The final xtable output follows: % latex table generated in R 1.8.1 by xtable 1.2-2 package % Tue Jun 22 09:56:36 2004 \begin{table}[ht] \begin{center} \begin{tabular}{rrrrr} \hline &
2002 Dec 13
1
Loading libraries: Nas introduced
Hi all, I am trying to package a library in R 1.6.1 (Windoze XP). I have read the document "Writing R extensions" and think I have done things correctly (though apparently not). I have searched the mail archives for help to no avail. When I try to attach the library using, eg > library( libname, lib.loc=path.to.library) I get this message: Warning message: NAs introduced by
2005 Aug 12
1
Help converting a function from S-Plus to R: family$weight
Hi all I am converting an S-Plus function into R. The S-Plus code uses some of the glm families, and family objects. The family objects in S-Plus and R have many different features, for example: In R: > names(Gamma()) [1] "family" "link" "linkfun" "linkinv" "variance" [6] "dev.resids" "aic"
2007 Nov 08
1
Mixing lty specifications in legend
Hi all I have a plot with lines, one specified as (say) lty=1, using standard line types, and another as (say) my own spec: lty="51". I can't get legend to display both. Toy example: > plot(1~1) > legend("topright", lty=c("51",1), legend=c("My own","Standard")) Error in segments(x1, y1, x2, y2, ...) : invalid line type: must be
2004 Nov 11
1
substitute/paste question for using Greek in plot titles
Hi all I am having troubles making sense of why code (1) below fails but code (2) below works. Code (1): > phi.1 <- 1 > plot(0 ~ 0, + main=substitute(paste("A vaue for ",phi," = ",phival), list(phival=phi.1)) ) Error in paste("The two deviances for ", phi, " = ", 2) : Object "phi" not found But this works: Code (2): >
2005 Oct 06
2
R/S-Plus equivalent to Genstat "predict": predictions over "averages" of covariates
Hi all I'm doing some things with a colleague comparing different sorts of models. My colleague has fitted a number of glms in Genstat (which I have never used), while the glm I have been using is only available for R. He has a spreadsheet of fitted means from each of his models obtained from using the Genstat "predict" function. For example, suppose we fit the model of the type
2008 Feb 27
2
Adding LaTeX cross-references into Sweave plots
Hi all I'm using Sweave and LaTeX, and love how they interact. But here's a different interaction I'm not sure how to achieve; I hope someone can help. I use a simple example, of course, to demonstrate. Suppose in my LaTeX document I have this: Here is a linear equation: \begin{equation} y = -1 + 3 x \label{EQ:example} \end{equation} This appears in the final product
2008 Jun 09
1
Bug/Error in formatC? (Was: Why doesn't formatC( x, digits=2, format= "g")...)
Hi all After posting what follows, Duncan Murdoch suggested perhaps a bug in formatC, or an error on documentation. Any comments? In particular, bug, error or not, any ideas about how I can consistently get two significant figures to print? P. ---------- Original Message ---------- Hi all I am not a C programmer, but I am trying to understand formatC to get consistent printing of
2007 Feb 28
1
On PostScript
I have been attempting to create a custom fax cover sheet for a hylafax web front end called avantfax. It requires as input an encapsulated postscript file conaining the glyph definitions and the text to be subsituted as strings having the form XXXX-to-variable or XXXX-from-variable. I have been trying to create a valid eps file using a varitiy of methods with no great succes. However, I ahve
2002 Nov 19
5
plotting intersecting planes
Hi all In two days, I am giving a small, informal workshop in our Department about using R. Initially, it was just for statistician, but surprisingly (to me anyhow) many mathematicians are also coming who have a MATLAB background. They are coming at the Workshop from a teaching perspective. They are considering using R to avoid licensing issues with MATLAB. One thing they were hoping me to
2007 Mar 07
1
Sweave issue: quotes in verbatim-like output print incorrectly
Hi all I love Sweave; use it all the time. But I recently received a new computer, and ever since I have had a problem I've never seen before. For example, I place the following in my Snw file: <<>>= sms <- read.table("http://www.sci.usq.edu.au/staff/dunn/Datasets/applications/popular/smsspeed.dat", header=TRUE) attach(sms) sms.lm <- lm( Time ~ Age*Phone,
2007 Jun 15
2
sma package, and MouseArray data set
Hi all I have just downloaded the sma package from CRAN. On installing on my linux machine, I get the message > library(sma) > data(MouseArray) Warning message: file 'MouseArray.RData' has magic number 'RDX1' Use of save versions prior to 2 is deprecated Hereafter, MouseArray is not found: > MouseArray Error: object "MouseArray" not found We were