fortune(197)
If anything, there should be a Law: Thou Shalt Not Even Think Of Producing A
Graph That Looks Like Anything From A Spreadsheet.
-- Ted Harding (in a discussion about producing graphics)
R-help (August 2007)
Filling graphics objects with lines dates back to the days when
Check out the high performance computing task view on CRAN.
--
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-boun...@r-
project.org] On Behalf Of
fortune(197)
If anything, there should be a Law: Thou Shalt Not Even Think Of Producing A
Graph That Looks Like Anything From A Spreadsheet.
-- Ted Harding (in a discussion about producing graphics)
R-help (August 2007)
Also read the discussion started with:
I would generally write a function to create the entire first plot, then the
entire 2nd plot based on data or other arguments passed in, then in your loop
or whatever call the function with the different steps. This will recreate the
plots from scratch at each step rather than adding to the
For 1 you can just reverse one of the y ranges, e.g.:
updateusr(1:2, range(0,y1), 1:2, rev(range(y2)) )
on my computer for some reason the axis command needs you to explicitly set the
at points, but then it works properly.
For 2, are the axes on all the plots the same? If so you can put all
A fairly simple way is to generate one series with all the Tuesdays, then
another with all the Thursdays, combine and sort.
sort( c( seq.Date( as.Date('2010-6-29'), by='week', length.out=10),
+ seq.Date( as.Date('2010-7-1'), by='week', length.out=10) )
+ )
[1] 2010-06-29 2010-07-01 2010-07-06
It is hard to know exactly what you want without a description of your data or
what you want the final plot to look like. But you can do the equivalent of
plot followed by multiple calls to points by using a loop, apply functions, the
lattice package or the ggplots2 package (I'm guessing the
Use the merge function, look at the by.x and by.y arguments, also look at the
all.x and all.y arguments as well as the suffixes argument. You may need to
delete some columns after the merge (or replace missing values in one column
with those in the same location from the next column, see the
The problem is that tapply is expecting a vector for the first argument, your
first argument is a list or data frame, so the length that it sees is the
number of list elements (columns of the data frame). You need to either pass a
single vector, or use functions like aggregate or the plyr
How about:
#my example:
dev.new()
layout( rbind( c(1,2), c(7,7), c(3,4), c(8,8), c(5,6), c(9,9) ),
heights=c(10,1,10,1,10,1) )
#Graph 1:
plot(rnorm(20), rnorm(20),
xlab = Results 1 (Int),
ylab = Variable A,
main = Factor X)
#Graph 2:
plot(rnorm(20),
.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
From: Atte Tenkanen [mailto:atte...@utu.fi]
Sent: Friday, June 25, 2010 10:08 PM
To: Atte Tenkanen
Cc: Greg Snow; David Winsemius; R mailing list
Subject: Re: [R] Wilcoxon signed rank test and its requirements
Atte Tenkanen
Let me see if I understand. You actually have the data for the whole
population (the entire piece) but you have some pre-defined sections that you
want to see if they differ from the population, or more meaningfully they are
different from a randomly selected set of measures. Is that correct?
The layout function is base graphics, wireframe from lattice is grid based and
they don't play well together without extra effort. The simplest option will
probably be to look at the help page for print.trellis, specifically the split
and more arguments. Then look at the examples to see if
If you want a more objective eye-ball test, look at:
Buja, A., Cook, D. Hofmann, H., Lawrence, M. Lee, E.-K., Swayne,
D.F and Wickham, H. (2009) Statistical Inference for exploratory
data analysis and model diagnostics Phil. Trans. R. Soc. A 2009
367, 4361-4383 doi:
Using par(new=T) is dangerous and tricky for those people who understand what
it does and how to use it. Trying to use it without fully understanding it
will be much worse.
I would use the updateusr function from the TeachingDemos package instead. The
first example on the help page may give
Is this what you want:
y1 - c(-30353.382, -21693.519, -7049.923, -72968.722, -10267.584,
-269432.795, -19847.670, -686283.171, -376231.754, -597800.080,
-274637.587, -112663.167, -39550.445, -133916.431)
xlabs - c(1, 7, 13, 2, 8, 14, 3, 9, 4, 10, 5, 11, 6, 12)
y2 - c(50, 25,
Well here is one way (but this finds too many, then reduces, so if the final
result is near the memory limit, this would go over first):
unique(t(combn( rep(LETTERS[1:5], each=2), 3)))
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
The line for the perfect match would be abline(0,1) if you want to allow affine
transformations, then it gets a bit harder.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Look at the interactive function, it may do what 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-boun...@r-
project.org] On Behalf Of
Before doing normality tests look at fortune(117) and fortune(234). If you
still feel the need to have the computer print out a p-value for a test of
exact normality, then try SnowsPenultimateNormalityTest in the TeachingDemos
package. If you want a test that is more meaningful, then look at
One approach is to use the within function:
within(list(), {a-1; b-a})
$b
[1] 1
$a
[1] 1
Now, whether that is simpler or more compact than other options is for you (or
other users) to decide.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
If you want to test the null that all datasets come from the same distribution,
then I would probably do this as a permutation test. Find the largest K-S
distance between 2 groups, then randomly permute the data into a new set of k
groups (with same sample sizes) and find the largest K-S
You should also look at fortune(106) and think about possible other solutions
to your overall objective.
--
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
Just to expand a little on David's reply.
The vs. and | vs. || issue is really about where and how you plan to use
things. and | work on vectors and are intended to be used to combine logical
vectors into a new logical vector (that can be used for various things).
and || are used for
, June 18, 2010 12:16 PM
To: li li; Greg Snow
Cc: r-help
Subject: RE: [R] questions on some operators in R
Li li,
I know many S-language old timers would tell you to use - over = for
assignment. Speaking from my own painful experience of debugging S/R
codes, I much much much prefer
('106')
Personally I have never regretted trying not to underestimate my own future
stupidity.
-- Greg Snow (explaining why eval(parse(...)) is often suboptimal, answering
a question triggered by the infamous fortune(106))
R-help (January 2007)
--
Gregory (Greg) L. Snow Ph.D
Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: Horace Tso [mailto:horace@pgn.com]
Sent: Friday, June 18, 2010 3:15 PM
To: Erik Iverson; Greg Snow
Cc: r-help
Subject: RE: [R] questions on some operators in R
You still couldn't sway
The cat function is probably the best approach, but if your really feel the
need to use print then you can just assign blank names (now it will be a named
vector and slower in heavy calculations, but the printing is different). Try
something like:
names(x) - rep( '', length(x) )
print(x)
#
One possibility (there are others as well) is write your own function that
given the name of the country will grab the data and create the plot that you
want. Then use the tkexamp function in the TeachingDemos package to create the
GUI for this function.
Other options (which I am less
Others mentioned progress bars and sprintf, one other option is to use a named
vector and let R to the formatting:
tmp - c(10, -1234) # or variables to put the values in
names(tmp) - c('Iteration', ' Log Likelihood')
print(tmp)
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
...@imail.org
801.408.8111
From: khush [mailto:bioinfo.kh...@gmail.com]
Sent: Saturday, June 12, 2010 5:38 AM
To: Greg Snow
Cc: r-help@r-project.org; Petr PIKAL
Subject: Re: [R] points marking
Hi,
Well Thanks for letting me know that pch is of no use with segments petr. I am
using lend
...@gmail.com]
Sent: Friday, June 11, 2010 12:00 AM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] points marking
Dear Gregory ,
Thnaks for your reply and help. I am explaining you my problems again, below
is my script for the same .
Dom -c (195,568,559)
fkbp - barplot (Dom, col=black, xlab
newmat - cbind( oldmat, order=seq(nrow(oldmat)) )
See ?seq and/or ?rev for descending.
--
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-boun...@r-
Your question is not really clear, do either of these examples do what you want?
with(anscombe, plot(x1, y2, ylim=range(y2,y3)) )
with(anscombe, points(x1, y3, col='blue', pch=2) )
with(anscombe, segments(x1, y2, x1, y3, col=ifelse( y2y3, 'green','red') ) )
with(anscombe, plot(x1, y2,
If you cannot set the aspect ratio to 1 for the entire plot (Peter's solution),
then you may consider using either subplot or my.symbols (TeachingDemos
package) to create an asp=1 region within the plot that you can use to plot the
rotated rectangle.
The other option is to do a little more
You could try something like this (untested):
tmpfun - function(i) {
+ tmp - paste( ^k., i, sep=)
+ apply( subset(mydf, select=grep(tmp, names(mydf) ) ), 1, min )
+ }
out1 - lapply(1:10, tmpfun)
names(out1) - paste( min.k., 1:10, sep= )
mydf2 - cbind(mydf, out1)
--
Gregory (Greg) L.
If your data came in using read.csv then it is most likely a data frame rather
than a matrix. Try as.matrix to convert it to a matrix and then use barplot.
If that does not work then give us a sample of your data and the exact commands
(copy/paste) that use used along with any errors/warnings.
...@imail.org
801.408.8111
From: Bart Joosen [mailto:bartjoo...@hotmail.com]
Sent: Monday, June 07, 2010 11:37 PM
To: Greg Snow; r-help
Subject: RE: [R] Help with seting up comparison
Greg,
the animals are a sample of a larger population, as you guessed.
I used lmer to estimate the effects:
lmer(Count
The my.symbols function (TeachingDemos package) allows for defining your own
symbols to use in plots using base graphics (see ms.filled.polygon for an
example), there is also panel.my.symbols which works with lattice (possibly
with general grid, but I have not tested it that way).
Those may
While it is possible to set your own dash patterns as you show below, it is
unlikely that the resulting graph will be very meaningful. Most people cannot
keep the detailed dash patterns separate, and if they need to refer to a legend
then it makes it even harder (See Bert Gunter's rant on the
Does the collapse argument to the paste function do what you want? Possibly
nested inside another paste.
--
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
Once you have your image displayed in a plot, look at the updateusr function in
the TeachingDemos package for a way to modify the coordinate system to what you
want so that using locator() gives the results that you want.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
Do you just want a rectangle with different vertical color bands? Then look at
the image function. Do you want a small rectangle that goes the length of the
x-axis with these color bands, but gives room for another plot above that?
Then look at the subplot function (TeachingDemos package)
Are you interested in only those 35 animals (not every going to look at any
other animals other than those 35, but you want to predict what will happen for
those 35)? Or are the 35 animals a sample of a larger population of animals?
If the later (seems the most likely case) then you probably
Usually when read.table converts numbers to factors it means that there is a
problem in the data file, an extra character somewhere. It is best to fix the
problem in the source data (or a copy of the source data) so that the data
imports properly rather than try to fix it post hoc. If that is
Look at the strapply function in the gsubfn package. It may do what 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-boun...@r-
want to ask
like I
need to make round ended bars instead of normal one I have to look into
rgl
for the same, but is there any option which you think suitable for me
in
barplots. Whats your suggestions.
Thank you
Jeet
On Fri, Jun 4, 2010 at 11:09 PM, Greg Snow greg.s...@imail.org wrote
The TeachingDemos package does not in any way replace the rgl package. They
serve very different purposes (the TeachingDemos package does use rgl for a
couple of functions).
I would be very surprised if there was anything in the TeachingDemos package
that would be of help in creating barplots
It looks like polar.plot does not handle negative lengths, you can preprocess
the data and just add 180 degrees to the angles corresponding to negative
lengths and then use their absolute values.
The radial.lim is not ignored, based on the documentation the range is then
made pretty (and 100
This is really a user interface issue and the standard user interface is
different between platforms. Would tcltk (or RGTK or ...) be a possible
solution for you? tcltk is fairly consistent across platforms and does provide
for this type of thing (you can have a button to press to continue
?'::'
--
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-boun...@r-
project.org] On Behalf Of thmsfuller...@gmail.com
Sent: Friday, May 28, 2010 12:55
The TkListView function in the TeachingDemos package is an interactive tool for
looking at the structure and contents of lists and other objects.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
Others pointed out that the error message is due to ozon being a data frame,
but I think the true source of confusion comes a bit earlier. You really need
to understand more about data objects and the search path.
You first read in a table and name it tab1.
Then you attach tab1 to the search
Inline below:
From: Tal Galili [mailto:tal.gal...@gmail.com]
Sent: Wednesday, May 26, 2010 12:26 AM
To: Greg Snow
Cc: Faiz Rasool; R-help@r-project.org
Subject: Re: [R] Getting sink to work with message on R 2.11.0 - what didI
miss?
Hello Greg,
Thank you for the coding.
A few
Healthcare
greg.s...@imail.org
801.408.8111
From: Tal Galili [mailto:tal.gal...@gmail.com]
Sent: Wednesday, May 26, 2010 2:10 PM
To: Greg Snow; h...@stat.berkeley.edu
Cc: Faiz Rasool; R-help@r-project.org
Subject: Re: [R] Getting sink to work with message on R 2.11.0 - what didI
miss?
Hello Greg
What other packages do you have loaded? Sometimes things interfere with each
other. Also, what version, os, etc are you working with? (the info asked for
in the posting guide).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
and it will start to divert the output to a txt or a .doc file?
Thank you once again to all of those who have participated in this
thread.
Faiz.
- Original Message -
From: David Winsemius dwinsem...@comcast.net
To: Greg Snow greg.s...@imail.org
Cc: r-help@r-project.org
Sent
Try your same system command, but set intern=TRUE in the call and see if that
does what 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
The R2wd package can be used to send things to word documents, that may work
for you. If you want this done automatically you could look at the txtStart
and related functions in the TeachingDemos package and just change the parts
that send plain text to the file (sink) with commands from R2wd.
Look at txtStart and friends in the TeachingDemos package as an alternative to
sink that includes commands as well as output.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Yes, and many of us also know why doing so is a bad idea.
This has been discussed before, if you search the archives you can find the
full discussion showing how, why not, and better approaches.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
It depends on what you mean by display values. In addition to the other
suggestions also look at the identify function as well as TkIdentify and
HTKidentify in the TeachingDemos package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
The clip function will limit the area that other functions (including abline)
plot to, so that is one option.
--
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
An option similar to Bert's but looking more like a standard hypothesis test
output is to use the function:
SnowsCorrectlySizedButOtherwiseUselessTestOfAnything from the TeachingDemos
package.
If you want a more useful result then you will need to be less general and more
specific.
--
Have you read the BoxCox paper? It has the theory in there for dealing with an
offset parameter (though I don't know of any existing functions that help in
estimating both lambdas at the same time). Though another important point (in
the paper as well) is that the lambda values used should be
?grconvertX
--
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-boun...@r-
project.org] On Behalf Of Oliver
Sent: Monday, May 17, 2010 8:24 AM
To:
Look at the grconvertX and grconvertY functions for a built in solution with
much more flexibility.
--
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
, 2010 3:50 PM
To: Greg Snow; 'Bak Kuss'; murdoch.dun...@gmail.com;
jorism...@gmail.com
Cc: R-help@r-project.org
Subject: RE: [R] P values
Inline below.
-- Bert
Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help
I think this last line is a fortune candidate:
It's not just that different disciplines rediscover the same ideas, they also
relabel them.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Is it the tick labels that you want to change?
-Original Message-
From: Elisabeth Bjerke Rastad ebr...@post.uit.no
To: r-help@r-project.org r-help@r-project.org
Sent: 5/10/10 11:20 AM
Subject: [R] [Fwd: Re: Plotting log-axis with the exponential base to a plot
with the default logarithm
I nominate Duncan's last statement:
If you don't want informative help files, it's really not much work to
make uninformative ones.
Duncan Murdoch
For the fortunes package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
Here is a simple example of a permutation test on medians without pairing and
different numbers of subjects in each group:
sw - iris$Sepal.Width[ c(101:130, 51:70) ]
group - rep( 1:2, c(30,20) )
out - replicate( 1999, { tmp - sample(group);
median(sw[tmp==1]) - median(sw[tmp==2]) } )
Probably easiest using the segments function.
--
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-boun...@r-
project.org] On Behalf Of A Ezhil
Sent:
Bak,
I think that you are focusing too much on strict definitions rather than on
understanding the concepts. Definitions are important to make sure that we are
consistent, but understanding is more important.
The main idea behind p-values and other forms of hypothesis testing is a
measure of
Here is one possibility:
tmp - sample(c('R','L'), 100, replace=TRUE)
tmp2 - rle(tmp)
tmp3 - sapply( 1:length(tmp2$values),
function(i) paste( rep(tmp2$values[i], tmp2$lengths[i]), collapse='') )
table(tmp3)
the rle function computes the run lengths, the sapply line converts those
results
Permutation tests are real tests (if done properly), but one subtle but
important note: The null hypothesis being tested is that the 2 distributions
are identical, the medians being equal is part of that, but the null includes
more than just that assumption.
--
Gregory (Greg) L. Snow Ph.D.
See my recent reply under the subject bar order using lattice barchart()
Running this code before doing your plot:
barley$variety - reorder(barley$variety, barley$yield, function(x) x[2] )
will cause the bars in all the plots to be reordered such that 1931 Waseca is
increasing, is that what
Don't use the assign function (it is not even clear what you are trying to do
with it).
Here is a better approach based on your code:
cc - list()
d - 1
for (i in data) {
+ cc[[d]] - table( ...
+ d - d + 1
+ }
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
I use the ci.examp function (TeachingDemos package), but your question is so
vague that I don't know if that will help you or not.
If you can give more detail on what you want to accomplish then we have a
better chance of being able to help.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data
Because if you use the sample standard deviation then it is a t test not a z
test.
--
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-boun...@r-
We cannot be certain without knowing what the data in cw3_data.txt is, but here
are some likely issues.
Notice that:
(1-0.7335039)*2
[1] 0.5329922
Which implies that the wolfram value comes from taking the smaller tail area
and multiplying by 2, which is a common way to compute p-values for
The short answer to your query is ?reorder
The longer answer (or a longer answer) gets into a bit of philosophy (so feel
free to go back to the short answer and skip this if you don't want to get into
the philosophy, you have been warned). Let's start with the question: is the
order of the
This can be further simplified by combining the 2 subs into a single
gsub('[$,]','',as.character(y)).
This will then convert $123$35,24,,$1$$2,,3.4 into a number when you may have
wanted something like that to give a warning and/or NA value.
The g in gsub stands for global (meaning replace
You could do a hierarchical clustering, then look at the height of the last
combination relative to the other heights, for your data:
tmp - hclust( dist( c(1,2,3,2,3,1,2,3,400,300,400) ) )
tmp2 - hclust( dist( c(400,402,405, 401,410,415, 407,412) ) )
tmp$height
[1] 0 0 0 0 0 0
The pam function in the cluster package accepts either raw data or a
dissimilarity matrix and does the same idea as kmeans. The daisy function has
more options for creating the dissimilarity matrix, if what you want is not in
there, you could still use it as a model for creating your own
Golf entry:
mean( replicate( 1, t.test(rnorm(10, 0.1, 1), alternative='greater', mu=0,
conf.level=0.95)$p.value 0.05))
Or
mean( replicate( 1, t.test(rnorm(10, .1), a='g')$p.value .05))
or even
mean( replicate( 1, t.test(rnorm(10, .1), a='g')$p. .05))
--
Gregory (Greg) L.
. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
From: Joris Meys [mailto:jorism...@gmail.com]
Sent: Thursday, May 06, 2010 12:26 PM
To: Greg Snow
Cc: Thomas Roth; level; r-help@r-project.org
Subject: Re: [R] P values
Correction, I understood you wrong
First a note, while that is a nice list, I think it needs a disclaimer about
only running tests that answer a meaningful question for the data/problem being
studied. If all those tests are run on datasets, I would be most suspicious of
those datasets which passed all the tests. Also, failing
We cannot reproduce your example, don't have the data (or don't know where it
is if we do) and where did the allEffects function come from?
If this just makes a regular plot using base graphics and not messing with the
user coordinates, then you can just use the points function to add
...@gmail.com]
Sent: Sunday, May 02, 2010 1:37 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] generating correlated random variables from different
distributions
Thank you for your reply. The application is a Monte Carlo simulation
in environmental planning. Different possible
This is a Frequently Asked Question, so frequently in fact that it is found in
the FAQ along with a couple of answers and discussion of their merits.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
There exists a set of batchfiles for windows (they have been mentioned several
times on this list before, searching the archives should give you their
location) that will move or copy the installed packages from the folder for an
old R installation to the folder for your new installation
The Predict.Plot and TkPredict functions in the TeachingDemos package can also
help with visualizing what the model means and the effect of the different
terms.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original
-Original Message-
From: Nevil Amos [mailto:nevil.a...@gmail.com]
Sent: Thursday, April 29, 2010 5:37 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] reduce size of pdf
The file is a large number of scatterplot matrices (120pp of 4x4
matrix) the individual plots may have up
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of Kyeong Soo (Joseph) Kim
Sent: Friday, April 30, 2010 4:10 AM
To: kMan
Cc: r-help@r-project.org
Subject: Re: [R] Curve Fitting/Regression with Multiple Observations
[snip]
By
The nchar and substring functions are both vectorized, you can do something
like:
substring(state.name, 1, nchar(state.name)-1)
And it should be much faster.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original
When I work with clients who want to cut and paste to word or powerpoint I
usually use the odfWeave package, set up a template file with the tables and
graphs (possibly other output), then I run that through odfWeave and then use
openoffice to save the results as a word file that I can send to
I don't know what is specifically causing the error, but I think that you will
be happier in the long run (and probably short run) if you abandon the use of
assign and - and instead use lists.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
So does each person have multiple rows and you want to sample the set of rows?
The usual approach that I take is to split them into a list, sample from the
list, the put the list back together, for example:
tmp1 - split(as.data.frame(state.x77), state.division)
tmp2 - sample(tmp1,
You have the correct general idea, but it looks like lp may have already been
transformed to be in the range 0-1 rather than number of days, if that is the
case then you don't need to dived by 29. Again.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
1101 - 1200 of 2156 matches
Mail list logo