similar to: Properly initializing a plot

Displaying 20 results from an estimated 10000 matches similar to: "Properly initializing a plot"

2007 Nov 07
1
strwidth and strheight for rotated text
Dear All, I would like to plot text with a box around it. I used strwidth and strheight to compute the size of the box which is plotted with rect: z <- rnorm(10) # horizontal text works plot(rnorm(10)) x1 <- 5 y1 <- 0 label <- "Label" cha <- paste(" ", label, " ", sep = "") xh <- strwidth(cha, cex = par("cex")) yh <-
2000 Nov 08
1
Graphics-Device-Size vs. Window-Size
I want to layout on screen a graphic bigger than the screen (width=16.53543, height=11.69291) but strwidth() and strheight() give wrong results. > x11(width=42/2.54, height=29.7/2.54, pointsize=12) > plot(1,1, type="n", xlim=c(0, 1), ylim=c(-1, 0), xlab="", ylab="", axes=FALSE) > strwidth("Whatever") [1] 0.08471151 > # Now resize the window and
2000 Nov 08
1
Graphics-Device-Size vs. Window-Size
I want to layout on screen a graphic bigger than the screen (width=16.53543, height=11.69291) but strwidth() and strheight() give wrong results. > x11(width=42/2.54, height=29.7/2.54, pointsize=12) > plot(1,1, type="n", xlim=c(0, 1), ylim=c(-1, 0), xlab="", ylab="", axes=FALSE) > strwidth("Whatever") [1] 0.08471151 > # Now resize the window and
2003 Aug 06
3
Slight problem in sort
In platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 7.1 year 2003 month 06 day 16 language R I get > sort(c(3,1,NA)) [1] 1 3 Shouldn't NAs be retained by default? Thanks -Frank ---
2003 Apr 21
3
Dates in read.spss
I am using read.spss in the foreign package to read an SPSS save file. For date variables I get huge values such as 11489990400. Does anyone know how to convert these values to R POSIXct date objects? Thanks in advance -Frank platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor
2004 Dec 20
3
RE: [R] SAS or R software
Yes, par(family="mono") would work, except that I get R segfaults from this sequence: > > plot.new() > par(family="mono") > par(cex=8) > strheight("foo") Process R segmentation fault (core dumped) at Mon Dec 20 16:07:56 2004 on R 2.0.1 (2004-11-15), Red Hat Enterprise Linux AS release 3 In my code I call strheight and strwidth several times in
2001 Apr 07
2
A programming puzzler
I am trying to replicate part of the function of the S-Plus terms.inner function. I don't need an entire model terms object but R expressions or character strings containing the innermost variable name given a vector of character strings or expressions. Here are some example inputs that each should result in the string or expression "x": x; x^2; g(x); h(g(x)); h(g(x^3));
2002 Nov 24
2
R CMD build
Using R CMD INSTALL packagename.tar.gz on platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 6.1 year 2002 month 11 day 01 language R I used to get html and latex files recreated only when the source .Rd file changed. Now I am getting html and latex (and text and example) recreated whenever I run R CMD INSTALL when I do
2002 Nov 24
2
R CMD build
Using R CMD INSTALL packagename.tar.gz on platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 6.1 year 2002 month 11 day 01 language R I used to get html and latex files recreated only when the source .Rd file changed. Now I am getting html and latex (and text and example) recreated whenever I run R CMD INSTALL when I do
2001 Jun 07
1
Suggestion for tapply
In S-Plus the ... argument for tapply is before simplify. In R (1.2.3) ... is after simplify, causing the user to have to specify simplify every time ... is used even though the default is usually OK. Unless there was a benefit to reordering the arguments, it might be a good idea to reconsider the current function definition. ... is probably used more than simplify (e.g., tapply(rainfall,
2003 Jun 17
1
Re: R: Problem from Philippe Glaziou
On Mon, 16 Jun 2003 09:56:07 +0200 Patrick Hausmann <p.hausmann at mr-regionalberatung.de> wrote: > Dear Frank, > > I can reproduce the problem from Philippe Glaziou (see attachment). > Maybe this can help. > Best, > Patrick > > Am Wollelager 11 > 27749 Delmenhorst > Tel. 04221 96373-0 > Fax 04221 96373-29 > > http://www.mr-regionalberatung.de >
2002 Dec 04
2
problem with load('http://....') (PR#2344)
Full_Name: Frank Harrell Version: 1.6.1 OS: RedHat 8.0 Linux Submission from: (NULL) (128.143.108.90) I get an error when trying to load a URL that contains a file that was saved using save(object, compress=TRUE): > load('http://hesweb1.med.virginia.edu/biostat/s/data/sav/kprats.sav') Error in gzfile(file, "rb") : unable to open connection In addition: Warning message:
2008 Jun 30
2
Plotting question: Problem with strwidth in 2.7.1
R users, I have a problem with function strwidth in 2.7.1. I'm trying to set the plot margins in a way that horizontal column labels will fit to the graph. tmp.t is a list of data.frame objects. This code works well in 2.6.0. ...snip.. library(gplots) for (i in names(tmp.t)) { bmp(filename=paste(i, "_", Sys.Date(), ".bmp", sep=""), width=1038,
2005 Jun 11
1
Wishlist: strwidth allow for rotation of text (PR#7931)
Hi, This is not a bug, but an enhancement suggestion. "strwidth" only gives the width of the text according to the x-axis user coordinates, and similarly for "strheight". Even if the par setting "srt" is changed to rotate the text, the resulting width (resp. height) is in terms of the non-rotated text. Currently, if I want to know how much space to leave for
2000 Dec 28
1
some (may be related) problems with windows(rescale=) (PR#794)
############################################################################### Before reporting 4 problems with windows(rescale=) I want to congrat on R1.2 and to thank r-developers for quickly adding the rescale workaround to the windows version. Happy New Year Jens Oehlschlaegel ###############################################################################
2001 Aug 23
1
Fortran routines from LINPACK in S+ but not R
Dear R Developers, I should have had the Design library running in R by now but have kept putting off changing some calls to LINPACK routines to use those builtin to R. Specifically I call dqrsl1 and dqr. Would it be an easy task to put those in the next release of R? If not I'll finally bite the bullet and get back into reading LINPACK documentation (which I have but haven't examined
2002 Apr 12
5
How to specify search order for require()
In a .First.lib I want to issue two require()s to insure that two other packages are loaded. But I want the package being loaded by .First.lib using library.dynam("mypackage",pkb,lib) to be higher in the search order than the two required packages, because I want to have a couple of functions from the two required packages overridden. What is the best way to do that? Thanks in advance
2009 Jan 14
4
How to get legend outside of plot?
I am creating a CDF plot function more user-friendly than any default r function. Depending upon the bimodality of the data (it is often bimodal), or any other strange data trends, the points can end up gathering in just about any corner of the plot. So, when I add a legend, whether I choose to add it in the bottom right, top left, or wherever, it will sometimes end up putting the legend right
2001 Jul 23
2
A useful GUI?
I saw an ad in the July 2001 Amstat News for a complex sample survey analysis package called Wesvar. The package has what appears to be a useful feature called a "Workbook" by which the user navigates analysis output. This is a hierarchical tree in which the user may click on a part of the analysis (table, regression fit, descriptive stats, etc.) so as to go directly to that output.
2001 Jun 15
1
Pass-through of unevaluated arguments
Thanks to Deepayan Sarkar (lattice) and Paul Murrell (grid) I have nearly finished porting the Hmisc library's xYplot function to R. xYplot extends xyplot to allow for error bars, bands, and a few other features. In S-Plus I extended the Trellis function xyplot mainly by writing panel.xYplot. In R, xyplot contains a lot of code, so I implemented xYplot by calling xyplot from it. Things are