?seq
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Schatzi
Sent: Friday, May 06, 2011 1:12 PM
To:
The logspline package does density estimation in a different way than KDE, but
it does allow for interval censored data (I know this value is between a and b,
but not where in that range) using the oldlogspline function. This may be what
you are looking for.
--
Gregory (Greg) L. Snow Ph.D.
Are you really sure that you want to do that?
Read the discussion starting with this post:
http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html for reasons why you
probably don't (yes, the question is about bar plots not histograms, but much
of it will still apply). Near the end of the
The persp function expects z to be a matrix, so you could reshape your data so
that z is a matrix (the reshape function or package may help). Or the
wireframe function in the lattice package expects data more like what you show,
that may be the easiest solution.
--
Gregory (Greg) L. Snow
Check your par() settings, specifically xpd. For more control see ?clip. If
that does not do enough for you then use lines or segments for complete control.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original
There is the bct function in the TeachingDemos package that does Box-Cox
transforms (though you could also write your own fairly simply). The
lappy/sapply functions will apply a function to each column of a data frame.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
?barplot
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Caitlin
Sent: Tuesday, May 03, 2011 11:36 AM
To:
In the first case you create a new data frame consisting of the 2nd column of
the original, then change the name of the only column in that new data frame,
then since nothing is done with that data frame it gets thrown away. So it is
not that nothing happened, but just that nothing useful
I would use the vis.test function along with vt.qqnorm (both in TeachingDemos
package). This will create several plots, one of which is your data, the rest
are simulated normals with the same mean and standard deviation. If you can
tell which plot stands out (and it is your real data) then
The general idea of the KS test (and others) can be applied to discrete data,
but the implementation in R assumes continuous data (does not have the needed
adjustments to deal with ties). The chi-square and other tests suffer from the
same problems in your case. In all cases the null
You could always put the commands into a script or function, then instead of
retyping everything just run the script or function.
There is the zoomplot function in the TeachingDemos package which does what you
are suggesting (but my quick test did not work with your map). You could use
that
A couple of things to consider:
The Kolmogorov-Smirnov test is designed for distributions on continuous
variable, not discrete like the poisson. That is why you are getting some of
your warnings.
With a sample size over 10,000 you will have power to detect differences that
are not
You might want to use the logspline package instead of the density function, it
allows you to specify bounds on a distribution.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Look at TkListView in the TeachingDemos package as one option (though for large
lists it is noticeably slower than str). It creates a tree structure
representing your list that you can then expand or collapse branches in.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
Do you have 2 e-mail addresses (or 2 versions of your email address) subscribed
to the list?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org
When running a large number of commands from a script that produces multiple
plots it is often best to send the plots to the pdf device (or other system)
that you can then page through after it is finished. You could also specify
par(ask=TRUE) then you would be prompted before changing the
An alternative that you may find interesting is the TkListView function in the
TeachingDemos package. This opens a separate window and shows the list
structure there with options for scrolling and expanding/collapsing sublists.
You will probably need to be a little patient while the display
If you don't need the web browser part then look at the tkexamp function in the
TeachingDemos package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org
A couple of possibilities:
The rasterImage function (in the graphics package)
The my.symbols and ms.image functions in the TeachingDemos package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
Sorry I took so long to get back on this, I have been out of town.
For your case you need to provide adjustments for both the x and y to
updateusr, try this:
library(TeachingDemos)
tmp - barplot(c(1.5,40),yaxt='n',names.arg=1:2,ylim=c(0,1.25*40))
axis(4)
tmp2 - par('usr')
updateusr(tmp[1:2],
If your loop is producing its own output then you probably should not use
txtProgressBar, but you can use either winProgressBar (if on windows) or
tkProgressBar (on all platforms, but need tcltk package). These open an
additional window with the progress bar and any additional information that
Going back to a previous graph does not automatically restore the coordinate
system (as you noticed). But you can store that information (lot less info
than your data in most cases) and reset it manually. Try:
x- 1:10
y- (1:100)*3
par(mfcol=c(2,1))
plot(x)
tmp1 - par('usr')
plot(y)
tmp2 -
For simple permutation tests I usually just code it up in regular R without
worrying about any packages. R is powerful enough that it is simple to do a
permutation test in only a few lines ( or sometimes just one long line). And
that way you know exactly what it is doing.
--
Gregory (Greg)
Look at the updateusr function in the TeachingDemos package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of
Some of the functions that were the first in the TeachingDemos package were
originally written to help me visualize something, so it is not just teachers
demoing, but people demoing to themselves. It has become a bit of a misc
package with several utilities that are useful in themselves, but
You can use simulation:
1. decide what you think your data will look like
2. decide how you plan to analyze your data
3. write a function that simulates a dataset (common arguments include sample
size(s) and effect sizes) then analyzes the data in your planned manner and
returns the p-value(s)
It is better to replace your later calls to plot with calls to lines instead,
then you don't need to use par(new=T) which as you see tends to cause problems.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original
[mailto:muzna.a...@gmail.com]
Sent: Sunday, April 03, 2011 12:52 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] kernel density plot
i am sorry greg, can you explain that with an example?
On Mon, Apr 4, 2011 at 12:11 AM, Greg Snow
greg.s...@imail.orgmailto:greg.s...@imail.org wrote
Here is a way to do it using just base graphics:
layout(matrix(c(1,1,2,3), 2, 2, byrow = TRUE))
plot(runif(10), type='b', ylim=c(0,1))
x.tmp - grconvertX(4, to='ndc')
y.tmp - grconvertY(0.9, to='ndc')
plot(runif(20), type='l', ylim=c(0,1))
par(xpd=NA)
segments( 10, 1,
grconvertX(x.tmp,
Just a note, Base graphics does support transparency as long as the device
plotting to supports it.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org
You could do bootstrapping for confidence intervals or permutation tests for
just comparing the medians. There are other tools as well, just be sure that
you understand what you are testing and what assumptions are being made in
whatever method you choose.
--
Gregory (Greg) L. Snow Ph.D.
There are several non-normal distributions built in that you could just use
their generationg functions. There are packages (most with dist somewhere in
the name) that allow for functions on standard distributions including
combining together distributions.
If your distribution is not one of
]
Sent: Tuesday, March 29, 2011 4:41 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: RE: [R] Creating 3 vectors that sum to 1
Hi Greg,
Thanks.
Here is one approach to speeding up the 1st method that I had
suggested:
n - 1
set.seed(123)
rtrg - matrix(NA, n, 3)
system.time
Do a search for Dirichlet, that may give you the tools you need. Also for
plotting 3 vectors that sum to 1, instead of a 3d scatter plot you should look
into a triangle or trilinear plot, see ?triplot in the TeachingDemos package
(the see also for that help page lists several other
Look at the cut, tapply, and barplot functions. There is probably also a nice
way to do this using ggplot2 package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
PM
To: Ravi Varadhan
Cc: Greg Snow; r-help@r-project.org
Subject: Re: [R] Creating 3 vectors that sum to 1
Here is an exploration of two different 3-tuple generators (that sum to
1) based on Greg's triplot function:
require(TeachingDemos)
n - 1000
rtrg - matrix(NA, n, 3)
for (i
There is a fairly basic interface with gnuplot in the TeachingDemos package,
see ?gp.open
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
Look at the strwidth and strheight functions. Also note the adj parameter (see
?par for details).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org
Well this starts veering towards fortune(194) and fortune(218).
Though I did one time receive a response from an editor and reviewers asking
for fewer p-values in favor of more confidence intervals. I was excited that
someone was willing to move in that direction (unfortunately, that
If you are interested in the fits, then I would just plot the fits. Plot the
fitted/predicted values from the 1st model as the x-values and the
fitted/predicted values from the second model as the y-values. It is best to
plot on a square plotting region and use asp=1, probably also doing
You can use the tapply function to sum within combinations, then pass the
results to barplot (possibly doing a reshape first).
Also look at the ggplot2 package, it may do the summing as part of the plot
call and probably does not need the reshape step.
--
Gregory (Greg) L. Snow Ph.D.
You can use simulation:
1. Simulate a dataset from what you believe the distribution and relationship
to be.
2. Analyze the simulated data in the manner you plan
3. Determine if the results are significant
Repeat the above many times keeping track of the sifnificances. The percent
significant
If a is a vector with missing values and b is the result of the function call
that has just the non-missing computations on a, then you can do something like:
newdat - rep(NA, length(a))
newdat[ !is.na(a) ] - b
Sometimes the which and match functions can be useful as well.
--
Gregory (Greg)
In general when you want to split up your data and do the same thing on each
piece then combine the results back together it is good to look at the plyr
package. But for this specific case you should look at the lmList function in
the nlme package which may do exactly what you want with the
It is all a matter of what you are comparing too, or what the null model is.
For most cases (standard regression) we compare a model with slope and
intercept to an intercept only model (looking at the effect of the slope), the
intercept only model fits a horizontal line through the mean of the
If you do ?Startup then you get the help page that describes all that R does as
it starts up and there are a few places in there that it describes where you
can put things to be run automatically.
I have done this for a doctor before who wanted to show the demonstration I
showed him to others,
The nls function does nonlinear least squares fits.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Stefan
If you are always using asp=1 then you can just do something like:
x - rnorm(100, 1, 5)
y - rnorm(100, 3, 4)
plot( x,y, asp=1)
r=2
nseg=360
x.cent - 5
y.cent - 7
xx - x.cent + r*cos( seq(0,2*pi, length.out=nseg) )
yy - y.cent + r*sin( seq(0,2*pi, length.out=nseg) )
lines(xx,yy, col='red')
It is not completely clear what you are trying to accomplish. Do you want to
draw a shape in the plot then identify all the points in that shape? You could
use locator (with type='l') to draw a polygon, then there are functions in add
on packages (mostly the spatial ones) that will detect
plotted?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: Jannis [mailto:bt_jan...@yahoo.de]
Sent: Saturday, March 05, 2011 11:54 AM
To: Greg Snow
Cc: Dieter Menne; r-help@r-project.org
Will failed.3 have each id exactly once? Or could it have multiple lines for a
given id?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
Here is one way:
tmp1 - data.frame(Species=c('setosa','virginica','versicolor'),
+ row=c(7,20,18) )
tmp.iris - iris
tmp.iris$row - ave(iris$Sepal.Length, iris$Species, FUN=seq_along)
out.iris - merge(tmp.iris, tmp1, by=c('Species','row'))
out.iris
Species row Sepal.Length
?cut
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Jason Rupert
Sent: Saturday, March 05, 2011 3:38 PM
To:
[ !is.na(tmp1) ]
paste(tmp1, collapse=' + ')
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: Matthew Douglas [mailto:matt.dougla...@gmail.com]
Sent: Thursday, March 03, 2011 3:43 PM
To: Greg Snow
Here is another way to do it without converting back and forth to character
strings:
digits - function(x) {
if(length(x) 1 ) {
lapply(x, digits)
} else {
n - nchar(x)
rev( x %/% 10^seq(0, length.out=n) %% 10 )
}
}
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Harsh
Sent: Thursday, March 03, 2011 3:53 AM
To: r-help@r-project.org
Subject: [R] R usage survey
Hi R users,
I request members of the R community to consider filling a
?View
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Alaios
Sent: Friday, March 04, 2011 2:49 AM
To:
Probably the best way to do this is by using the tikzDevice package to create
your graphs. This creates TeX commands to create the graph using the same
fonts and settings as the rest of the document. The pgfSweave package may also
be of interest (it uses tikzDevice to do sweaving).
--
Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: h.wick...@gmail.com [mailto:h.wick...@gmail.com] On Behalf Of
Hadley Wickham
Sent: Friday, March 04, 2011 1:28 PM
To: Greg Snow
Cc: Harsh; r-help@r-project.org
Subject: Re: [R] R usage survey
Ok, I am very
...@imail.org
801.408.8111
-Original Message-
From: Matthew Douglas [mailto:matt.dougla...@gmail.com]
Sent: Thursday, March 03, 2011 2:09 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] Regression with many independent variables
Thanks greg,
that formula was exactly
You probably want to use the gap.plot function in the plotrix package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On
It really depends on what question you are trying to answer. Things like the
relative importance of type I and type II errors could matter a lot.
Correlation among the predictors can affect things. What effect size are you
looking for and what power do you want? And much more.
There is a
Here are a couple of thoughts.
If you want to use the boot package then the statistic function you give it
just receives the bootstrapped indexes, you could test the indexes for your
condition of not more than 5 of each and if it fails return an NA instead of
computing the statistic. Then in
(Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: Matthew Douglas [mailto:matt.dougla...@gmail.com]
Sent: Tuesday, March 01, 2011 1:09 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] Regression
Don't put the name of the dataset in the formula, use the data argument to lm
to provide that. A single period (.) on the right hand side of the formula
will represent all the columns in the data set that are not on the left hand
side (you can then use - to remove any other columns that you
: Saturday, February 26, 2011 1:09 AM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] Interactive/Dynamic plots with R
Hi Greg
Ability to zoom in/out on x/y axis to begin with and then
adding/removing data sets.
Thanks!
-Abhi
On Fri, Feb 25, 2011 at 12:52 PM, Greg Snow
What types of interaction do you want?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Abhishek Pratap
Sent:
Look at ?quantile, especially the detail section on type and the second
reference (and the see also section). There are many different definitions of
quantiles/quartiles and different functions use different versions.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
Here is a solution using contour:
x - y - seq(-1.5,1.5,length=100)
z - outer(x, y, function(x,y) x^2+y^2)
contour(x,y,z, levels=1)
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
If instead of having a1, a2, etc. as global variables you put them into a list
then this becomes simple.
The general rule is that if you ever want to do the same (or similar) think to
a set of variable, then they should not have been separate variables, but part
of a bigger one. Lists work
The KS test was designed for continuous variables. The vcd package has tools
for exploring categorical variables and distributions.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
In addition to the other answers that you received you can also do:
library(TeachingDemos)
i[ quantile(i,.25) %% i %% quantile(i,.75) ]
This may or may not be more readable than the others. Also note that
precomputing both quantiles in one step may be faster than calling quantile
twice.
You
When using the windows gui I prefer the winProgressBar to the txtProgressBar.
It works basically the same, but does not put any characters into the terminal.
(there is also tkProgressBar that works on all platforms, but requires the
tcltk package).
--
Gregory (Greg) L. Snow Ph.D.
(Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: Albyn Jones [mailto:jo...@reed.edu]
Sent: Sunday, February 13, 2011 9:53 PM
To: Greg Snow
Cc: syrvn; r-help@r-project.org
Subject: Re: [R] Test for equivalence
There is a section on environments on the help page ?formula, but that may not
be completely clear to newer users.
Basically the idea is that when you specify a formula, the default place that R
will look for the variables in the formula is the data or newdata argument. So
if you use those
There are some interactive graphics tools in the TeachingDemos package (tkBrush
allows brushing, tkexamp helps you create your own interactive graphics, etc.).
There are also the iplots package, the rgl package (spinning in 3 dimonsions),
'tkrplot' package, the fgui package, the playwith
You may want to use the ggplot2 package for this (see ?coord_map), it can
combine maps and other plots and does a lot of the thinking about scaling and
projections for you.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
Modifying the 4th example on the help page for tkexamp (TeachingDemos package)
may help with exploring the effects of the different parameters and deciding on
a set to use.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
Those types of plots can be very hard to read. A better approach would be to
look at the lattice package or faceting in the ggplot2 package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Did you try running the examples on the help page ?txtProgressBar ?
Basically the txtProgressBar command creates the progress bar, then in the loop
the setTxtProgressBar command updates the amount of progress for that bar.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
Does it make sense for you to combine the 2 data sets and do a 2-way anova with
treatment vs. control as one factor and experiment number as the other factor?
Then you could test the interaction and treatment number factor to see if they
make a difference.
--
Gregory (Greg) L. Snow Ph.D.
The more common way to do this is to use groups, the default is to have a
different color for each group, but you can change that using trellis.par.set:
tmp - trellis.par.get()
tmp$superpose.symbol$pch = 0:10
trellis.par.set(tmp)
xyplot(Sepal.Width ~ Petal.Width, data=iris, groups=Species,
The usr parameter is either ylim or ylim plus 4 percent on either side (see
yaxs/xaxs), see the pretty function for possible ways to get the yaxp
information. Note that strwidth is based on the current coordinate system and
will not give you the proper values unless the plot region has already
You could use the floating.pie function in the plotrix package, but even the
author of that function/package has stated in the past that pie charts are not
the best tool. Also look at the symbols function for some alternatives, I
would use the thermometers (and if that does not give enough
The generic is what the user calls, the method is what the generic calls.
For example, the summary function is a generic function, when you issue a
command like summary(x) then the generic function looks at what type of object
x is and calls the appropriate method which might be the summary.lm
For your number 2, look at the outliers data set in the TeachingDemos package
and run the 1st set of examples, yes it uses a different rule than you use, but
still a common one. Think about what is happening in the example, doesn't that
make you a little nervous about methods that
You may want to look at the density.circular and plot.density.circular
functions in the circular package.
The pie slice idea is a bit tricky because the human eye tends to compare the
areas of the slices rather than the distance from the center (and the area will
be proportional to the
Another approach (still using the theory of sufficient statistics) is to
generate data from a normal distribution that matches exactly the sizes, means,
and standard deviations that you have, then analyze the simulated data.
The mvrnorm function in the MASS package can generate data with a
Look at ?par and specifically the ask option.
Or, you can use the pdf function to send a set of graphs directly to a pdf
file, then open the pdf file and step through (and go back if you want) the
graphs.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
How do you anticipate the number of doctors affecting the proportions?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On
You are comparing B[1] to A[1]^2, then B[2] to A[2]^2 etc. so for the AB pairs
you are doing the comparison. If that is what you want, then it is fine.
But if you want to compare the 1st B to all the A's, then the 2nd B to all the
A's, etc. Then it does not do this (but the expand.grid
What happens if you use the newdata argument name instead of data?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf
If you want to expand the area that the graph takes up (using the space that
the labels would have been in) look at the mar part of ?par.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
xyplot is a lattice plotting command, text is a base plotting command. The 2
types don't play well together without extra work. The base command plot with
text is probably the easiest, or you can just use plot and pch:
with(iris, plot(Sepal.Width, Sepal.Length, pch=c('s','e','i')[Species] )
Also ?splinefun (like approxfun but using splines instead of lines).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On
I would use a pdf file, see ?pdf for examples. This plots a bunch of plots to
a single file. You can also use tools like png (see ?png for examples) which
will create 1 file per plot. You can either specify a name each time, or set a
name pattern and have it fill in automatically. Either
How are your lists being created?
You can add each list to a mega list in a for loop, or use lapply to run a
function multiple times which outputs a list each time and these will
automatically be put together into a mega list.
If these don't work for you then tell us more about how you are
I get a different set of errors than you do (what version of R are you using?).
Patrizio showed one way to do what you want. But, what is it that you are
really trying to accomplish? What do you think the result of 20,000 normality
tests (each of which may not be answering the real question
So you want to combine multiple columns back into a single column with the
strings pasted together? If that is correct then look at the paste and sprintf
functions (use one or the other, not both).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
You can do this with regular expressions, since you want to extract specific
values from the string I would suggest learning about the gsubfn package, it is
a bit easier with gsubfn than with the other matching tools.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
701 - 800 of 2156 matches
Mail list logo