The help for filled.contour suggests using the plot.axes argument to annotate a
plot, try changing the last part of your 3rd example to:
filled.contour(nlong,nlat,z1,col=rainbow
(100),xlab=longitude,ylab=latitude,
plot.axes=map(add=TRUE))
Or
filled.contour(nlong,nlat,z1,col=rainbow
There is a z.test function in the TeachingDemos Package. Note however
that this function is meant for teaching purposes as a stepping stone
for students to learn the syntax and output for hypothesis test
functions before learning about t tests etc. The z.test function only
does one sample tests.
There is also the triplot function in the TeachingDemos package that
does some of what you want (but always shows the full range 0 to 1 on
all axes).
I expect that each of the implementations out there does part of what
you want and you may need to find which will come closest, or find which
is
I found a shapefile for a map of Canada at:
http://www.vdstech.com/map_data.htm you can read this in and plot it
using the maptools package (or the sp package and friends if you want
more control):
library(maptools)
tmp - read.shape('c:/maps/canada')
tmp2 - Map2poly(tmp)
plot(tmp2)
For
The package blockrand is now available on CRAN.
This package aids in doing block randomizations for clinical trials or
other situations where subjects or experimental units arrive over time
and need to be randomized one at a time. The block randomization keeps
the number of subjects in each arm
in regards to the dynamic resizing, one would think that
commands like
plot.default {package:graphics} does it, as I am exploring other
commands from graphics it seams like tkrplot may not be needed,
I am
not sure as I just started with graphics in R, maybe a
thanks
that was very helpful.
i have been reading and trying to modify the code around to suit, but
haven't been able to:
first, maximize the chart with the window being maximized, the way it
is it stays the same size after maximizing the window.
The function tkrplot has optional
Does the following (or some simple modification of it) do what you
want?:
library(tkrplot)
y - rnorm(1, 10, 2) + 5*sin( (1:1)/1000 )
tt - tktoplevel()
left - tclVar(1)
oldleft - tclVar(1)
right - tclVar(100)
f1 - function(){
lleft - as.numeric(tclvalue(left))
rright -
Gael,
Try the following to get you started:
library(tkrplot)
y - rnorm(1, 10, 2) + 5*sin( (1:1)/1000 )
tt - tktoplevel()
left - tclVar(1)
oldleft - tclVar(1)
right - tclVar(100)
f1 - function(){
lleft - as.numeric(tclvalue(left))
rright - as.numeric(tclvalue(right))
There is a function recenter.Map in the TeachingDemos package that can
be used with the maptools packages (rather than the maps package) to
move polygons around for better looking maps. The original idea was to
put the Alaskan islands on the left of the map rather than having some
of them on the
When barplots start getting complicated (and sometimes before that) you
may want to start considering dotplots (package lattice) instead.
For your specific problem you could possibly do the side-by-side plot,
then using the output from barplot and the rect function you could plot
a rectangle over
Here are a couple of quick thoughts on your problem.
1. Use alpha channels (may require you to produce all your graphs as pdf
files).
Fill each of your criteria categories with a mostly transparent color,
e.g. the full contour of z[1] between 20 and 30 is 20% opaque and the
full contour(s) of
Just to add a couple of thoughts to the previous suggestions.
If you really want output from things like summary.lm to have tabs instead of
spaces then you can type:
getAnywhere(print.summary.lm)
at the R prompt and it will show you the (not quite) source of code that R uses
to do the
par('usr') will give you the coordinates of the corners of the current plot.
If you want to go a little beyond this (more like your legend example) by
specifying that you want your text to be some distance from the bottom and left
of the plot and have the distance not affected by the scale
Look at the CrossTable function in the gmodels package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of array chip
Sent:
In addition to the other suggestions you may want to look at JGR
(http://www.rosuda.org/JGR/). It does most of what you asked (except
debugging, use the debug package for that).
-Original Message-
From: [EMAIL PROTECTED] on behalf of Michael
Sent: Wed 1/25/2006 1:09 AM
To:
The multcomp package may do what you want (there is mention of nested
variables in the help).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Liaw, Andy
Sent: Thursday, January 05, 2006 6:26 AM
To: 'Patrick Burns'; John Maindonald
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] A comment about R
[snip]
Any suggestion on how to go about
Using a gam model (package gam, possibly others) will take care of the
link function (and variance function) for you and allow using loess to
fit the data. Here is a quick example to get you started, though you
should read up on gam models yourself as well.
library(gam)
x - seq(0,1, length=250)
Here is one approach using lattice (trellis) graphics:
tmp.state - data.frame( Frost=state.x77[,'Frost'],
Murder=state.x77[,'Murder'],
Region=state.region)
library(lattice)
trellis.par.set(col.whitebg())
xyplot( Murder ~ Frost, groups=Region, data=tmp.state,
The slider function in the TeachingDemos and relax packages (same
function is in both packages you can use either) provides a way to do
this using a Tk window. There are also several functions in the
TechingDemos package that use a lower level interface to a Tk window
that you can look at their
Does this do what you want:
IED - function(risk){
tmp - outer(risk,risk,-)
tmp - abs(tmp)
return(tmp[lower.tri(tmp)])
}
--
Gregory L. Snow Ph.D.
Statistical Data Center, IHC
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
Look at ?Sys.sleep
--
Gregory L. Snow Ph.D.
Statistical Data Center, IHC
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ulrike Grömping
Sent: Monday, December 12, 2005 12:44 PM
To: r-help@stat.math.ethz.ch
There is a subplot command in the latest version of the TeachingDemos
package (version 1.1 available today) that does what you want using
traditional graphics (others have given suggestions using grid
graphics). An example:
x - 0:10
y - x^4
plot(x,y,xaxs='i',yaxs='i')
subplot(
Look at ?par specifically at the 'lend' argument.
You probably want to do:
par(lend=1)
Before doing your plot.
--
Gregory L. Snow Ph.D.
Statistical Data Center, IHC
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
25 matches
Mail list logo