I don't know why the AIC is different, but remember that there are multiple
definitions for AIC (generally differing in the constant added) and it may just
be a difference in the constant, or it could be that you have not fit the whole
dataset (based on your other question).
For an lm model big
I addition to the other responses you have received, you may want to play with
the run.hist.demo function in the TeachingDemos package to learn more.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
>
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
From: utkarshsinghal [mailto:utkarsh.sing...@global-analytics.com]
Sent: Monday, July 06, 2009 8:58 AM
To: Thomas Lumley; Greg Snow
Cc: r help
Subject: Re: [R] bigglm() results different from glm()+Another question
The AIC of the biglm models is
If the structure is your xx variable, then you are creating a plot that goes
from 1911 to 2006 (plus a little to either side), then asking the axis function
to draw and label an axis from 1 to 11, which is very far off the plotting
device to the left. Try giving the axis function a list of valu
code.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
From: utkarshsinghal [mailto:utkarsh.sing...@global-analytics.com]
Sent: Tuesday, July 07, 2009 12:10 AM
To: Greg Snow
Cc: Thomas Lumley; r help
Subject: Re: [R]
Here are some examples that may get you started (note that there is no
guarantee that a variable follows a given distribution after it has been
adjusted to have 0 correlation with another variable):
library(MASS)
tmp <- mvrnorm(25, c(0,0), diag(2), empirical=TRUE)
zapsmall(cor(tmp))
tmp2 <- exp
For this case it is quite simple, see ?ifelse
> z <- ifelse( x > 0, y, -y )
Hope this helps,
--
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.
The mvrnorm function in the MASS package has an argument to force the generated
data to have the exact mean/variance structure as specified which when used
with a diagonal variance matrix will generate data that has a 0 (within round
off error) correlation in the data. No post processing by Gra
lps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
From: utkarshsinghal [mailto:utkarsh.sing...@global-analytics.com]
Sent: Wednesday, July 08, 2009 2:24 AM
To: Greg Snow
Cc: Thomas Lumley; r help
Subject: Re: [R] bigglm() result
Well, since we don't have Data.txt it is kind of hard for us to replicate what
you have done.
Here goes a guess as to what the problem may be.
Have you told R anywhere that S1 and S2 are factors with 6 levels rather than
numeric vectors? Or are you just hoping that the computer can read your mi
Here is one approach (there are others, some that are probably better, but this
can get you started):
1. rearrange your data so that every insect is a single row with 2 columns: the
tree id and the species (this new dataset will have as many rows as the sum of
the values in the old dataset). T
?sink
--
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 Steve Jaffe
> Sent: Wednesday, July 08, 2009 1:03 PM
>
Look at the subplot function in the TeachingDemos package. Does that do what
you want?
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
rajesh j [akshay.raj...@gmail.com]
Sent: Friday, July 10, 2009 2:04 AM
To: milton ruser
Your contrasts are not linearly independent and therefore there are an infinite
number of possible correct answers, this tends to confuse computers (take 1/3
times the 3rd col, plus 2/3 times the 4th col, plus 3/3 times the 5th col and
compare that to the 1st col). You need to replace one of th
I believe there is a set of options in the ggplot2 package that will create a
plot and add the confidence region to it, you will need to look at the
documentation for ggplot2, I don't know the details (have not made it that far
on my to do list, not anything against the package).
--
Gregory (G
The dollar sign ($) is a magical shortcut for the [[ subset operator (yes the
doubling is intentional) for accessing parts of lists/data frames/etc. When
you try to use magical shortcuts for purposes beyond what they were designed
for, you get the computer equivalent of turning yourself into a
I don't know of a single package that is comparable to PASS, but the R system
itself is the most comprehensive tool available for power and sample size
computations.
For the simple cases you already found the pwr package, there are also some
power functions in the stats package and in some othe
Look at the box function, or use xaxt='n' and/or yaxt='n' rather than
axes=FALSE.
Hope this helps,
--
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
Leave the mgp setting alone and use xlab='' when you create the original plot.
This will put the y-label in the usual place and not create the x-label. Then
use the "title" or "mtext" function to place the x label where you want it.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistic
Look at the chull function and its examples.
--
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 Ahmed, Sadia
> S
If you need an explanation of what regression means, then you need to take a
course or 2 at your local university, or at least hire a statistical consultant.
If you understand regression and just need the explanation of how to do it
using R, then read section 11 (as well as everything else) of "
You are probably thinking of the "str" function. But also look at the
"TkListView" function in the TeachingDemos package for visualizing lists of
lists and complex objects.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
80
Imagemagick and gimp work on windows, linux, and mac as well and have tools for
creating animated gifs (and possibly other animation files).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-
Look at the xpd argument to the par 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 Miguel Lacerda
First make sure that myResults is a list (you probably did this, but just to be
sure):
> myResults <- list()
Then use doubled brackets [[]]:
> myResults[[1]] <- lm(...)
Etc.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
Re gression using age and Duration of disease as a
> continous factors
>
>
> I have read that multiple times without understanding anything.
>
> Greg Snow-2 wrote:
> >
> > If you need an explanation of what regression means, then you need to
> take
> > a
?grconvertX
-Original Message-
From: "Mark Na"
To: "r-help@r-project.org"
Sent: 7/21/09 3:05 PM
Subject: [R] How to extract the upper xlim and ylim of my plot?
Dear R-helpers,
I wish to place some text in a plot, at approx 10% of my upper xlim and
approx 90% of my upper ylim, i.e.
>
Doing the computations in R then the graphs in Excel reminds me of the maxim:
Measure with a micrometer
Mark with chalk
Cut with an ax
Before continuing you should really read:
http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html
and look at the final graphic in:
http://www.cs.uiowa
I am not sure that I fully understand what all you want to do (and I don't
understand why you need the correlation and if a correlation based on 3 pairs
is even meaningful), but here is a first stab at what you are trying to do:
tmp <- "Species Control_CR Damage_DR
A 10 2
A 9 3
A 7 4
A 9 2
A 8 3
Try adding replace=TRUE to your call to sample, then you will get numbers
closer to what you are expecting.
--
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 [mailt
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: Jim Bouldin [mailto:jrboul...@ucdavis.edu]
> Sent: Thursday, July 23, 2009 12:49 PM
> To: Greg Snow; r-help@r-project.org
> Subject: RE: [R] Random # generator accuracy
>
>
> Thanks Greg, that most defi
There are a couple of options:
The help page for lapply also includes the help for sapply and sapply has a
USE.NAMES argument that may do what you want (specify simplify=FALSE to force
the same behavior as lapply).
You can post specify the names like:
> names(mylist) <- vector.of.names
Do eit
Try:
> cbind( bm, res=apply(bm[,d],1 , sum) )
--
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 Alberto Lora M
Try something like (untested):
> mylist <- lapply(all.files, function(i) read.csv(i) )
> mydf <- do.call('rbind', mylist)
If all the csv files are conformable that rbind works on them (if the loop
method works then that should be the case) then this will read in each file,
store the data frames
Some programs quote everything to be "safe", others only quote when needed.
The only case that I know of that read.table and friends require quotes for is
when a separator is inside of a string, for example if you are using spaces as
the separator and have some names with spaces in them (e.g. "
Something like this (untested) may work for you:
> for (i in 1:132) {
+ a <- clim[ , , i]
+ nm <- sprint('clim%03d.txt',i)
+ write.table(a,nm)
+ }
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Origi
There is a function "rsaga.local.morphometry" in the RSAGA package that says it
computes curvature (among other things). It looks like that function was
designed for a different type of data than yours is, but it may work, or if
not, then you may be able to adapt some of the code to work with y
A general solution is not simple, some options include:
The thigmophobe.labels function in the plotrix package will place labels on the
side of a point furthest from the closest point (works well in some cases, but
does not guarantee non-overlap).
The dynIdentify and TkIdentify functions in the
Natural splines (nsin the splines package rcs in the Hmisc or Design package)
are linear outside of the range of the knots. You could use those and just
specify the knots to be within the portion that you want to allow to be
non-linear.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statis
Unless you are intentionally trying to distort your data and make the graph
harder to read (you don't want to do that), it is better to put the numbers in
the margin rather than at the top of the bars. Try the following line after
the barplot:
> mtext( dat$NumberOfPeople, side=1, line=1.5, at=
Look at the pairs2 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-boun...@r-
> project.org] On Behalf Of Jos
Also look at the frame and plot.new functions.
-Original Message-
From: "Mark Knecht"
To: "Bert Gunter"
Cc: "r-help"
Sent: 7/27/09 1:56 PM
Subject: Re: [R] skip plot/blank plot on purpose (multi-plot question)
On Mon, Jul 27, 2009 at 12:21 PM, Bert Gunter wrote:
> Well, all of this ca
nal Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Greg Snow
> Sent: Monday, July 27, 2009 5:42 PM
> To: Mark Knecht; Bert Gunter
> Cc: r-help
> Subject: Re: [R] skip plot/blank plot on purpose (multi-plot question)
>
If you want to have a gui that allows you to change parameter values using
buttons/sliders/etc. and see what the effects are, then look at the tkexamp
function in the TeachingDemos package (see the examples on the help page).
If you have a predetermined set of values for the parameter of interes
You can use par(mgp=c(...)) to change where the axis labels are placed by
default, but this affects both the x and y axis. Another alternative is to not
plot the x axis label (xlab=''), then use the title or mtext function you can
manually place the axis label where you want it. Also look at t
It still was not attached, but you can reduce the white space by reducing the
margins using par(mar=c(...)).
If you do par(mar=c(0,0,0,0)), then there will be no space between the plots,
using values larger than 0 will give space. But beware, you need to either
suppress the plotting of axis la
From: Jose Narillos de Santos [mailto:narillosdesan...@gmail.com]
Sent: Wednesday, July 29, 2009 5:10 AM
To: petr.pi...@precheza.cz; Greg Snow; r-help@r-project.org
Subject: Add a line in a Pairs2 and mark the axis length
Hi,
I have finally installed TeachingDemos trough zip file and installed on lbrary.
In addition to the other responses, you may want to look at the subplot
function in the TeachingDemos package for a way to place the image at a
location within the plot (the other answers so far use the image as a full
background), see the last example on the help page for a way to use the R log
In addition to Benjamin's response (which is the best way that I know of), you
may also want to look at the grconvertX and grconvertY functions for ways to
find the coordinates in the margins to plot at.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@
Try the View function (note capitol V), does that 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 Beh
Well the MASS package is support for a book, the details for most of functions
in the package are detailed in the book, so if you really want to know, either
look at the code, or read the book.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Noah Silverman
> Sent: Monday, August 03, 2009 12:26 AM
> To: r help
> Subject: [R] Scale set of 0 values returns NAN??
[snip]
> Using R is forcing me
> to take a much deeper l
Here is one approach that works on Windows (but not other platforms):
HWidentify <- function(x,y,label=seq_along(x), xlab=deparse(substitute(x)),
ylab=deparse(substitute(y)), ...) {
plot(x,y,xlab=xlab, ylab=ylab,...)
dx <- grconvertX(x,to='ndc')
Part of the problem is that there could in theory be multiple x values that
result in the same y value.
One approach if you are happy with something interactive rather than
programatical is to use the TkSpline function in the TeachingDemos package to
fit the spline function and drag the x-value
Well there is the sudoku package on CRAN, but sorry it does not play
tic-tac-toe or simulate flight.
--
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-hel
You can use the axis function to add tick marks and labels at specified
positions (including whatever origin you want to use). If you add shorter tick
marks without labels, then they are minor ticks (usually you will suppress the
default axes using axes=FALSE or xaxt/yaxt='n', then use the axis
A few functions that may help are splinefun or approxfun along with uniroot.
From: Kavitha Venkatesan [kavitha.venkate...@gmail.com]
Sent: Wednesday, August 12, 2009 3:43 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] Obtaining the value of x
You may also want to look at ?TeachingDemos::txtStart as an alternative to
sink, one advantage is that the commands as well as the output can be included.
With a little more work you can also include graphical output into a
transcript file.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
St
Kind of to second Steve's concerns, I would suggest that you change the names
of your functions slightly (put xx. in front of them or some other prefix).
I remember a friend telling of a unix administrator that aliased the rm command
to actually run rm -i (rm deletes files, the -i makes it ask y
?solve
--
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 Moreno Mancosu
> Sent: Friday, August 14, 2009 1:23 AM
Look at the my.symbols and ms.polygon 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-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.or
I believe that #if lines for C++ programs is handled by the preprocessor, not
the compiler. So if you want the same functionality for R programs, it would
make sense to just preprocess the R file.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.
Add ?View (note the capitol V) 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 [mailto:r-help-boun...@r-
> project.org] On Behalf Of Ottorino-Luca Pan
If you f function is a likelihood (or better a log likelihood), then you can do
profiling. Take the parameter of interest and change it a small amount from
the optimal value, rerun optim with this value fixed and let it optimize over
everything else. Repeat this for several values and see how
54 AM
> To: r-help@r-project.org
> Subject: Re: [R] Is there a construct for conditional comment?
>
>
> Why not
>
> if ( 0 ) {
> commented with zero
> } else {
> commented with one
> }
>
>
> Greg Snow-2 wrote:
> >
> > I believe that #if lines for C
Here is a one liner:
(yy <- do.call( rbind, sample( split(xx, xx$a) ) ))
Basically reading from inside out, it splits the data frame by a (keeping the
structure of b intact within each data frame) and returns it as a list, then
that list is randomized, then put back together into a single data
If you are using a pre created script file, then you may want to consider going
one more step and creating a sweave file. Then you can process this file and
the results will include the commands (unless you suppress them) as well as the
output, nicely formatted. It can also include graphics an
It looks like you are reinventing wheels here (not necessarily a bad thing).
If you want the probabilities associated with the normal distribution, then
look at the help for dnorm and pnorm functions.
If you are recreating this as a learning experience/homework, then you should
be up front abou
How current is the literature? Is the more recent literature using
Mann-Whitney because of inertia rather than best practice?
The Mann-Whitney/Wicoxon test is a special case of a permutation test that has
a shortcut computation. Fast computers were not available when these tests
were develope
Or just use the 'each' argument to 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-boun...@r-
> project.org] On Behalf Of Barry Rowlingson
> Se
Well,
If the first flip is H, then the HT pattern occurs with the first flip in the
second run (after however long the 1st run of heads is). If the first flip is
T, then the second run will be H's and the HT pattern will be the first flip of
the 3rd run. So the HT pattern will occur after 1 o
Look at ?sample for how to shuffle/permute a single vector (or rows of a data
frame/matrix) and ?replicate for a way to do it a bunch of times and return the
results in a nice form.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imai
Your data ranges from 0.67 to 1.21, just to simplify things let's assume the
that the histogram will go from the pretty numbers of 0.65 to 1.25 for a total
width of 0.6. Now consider the simplest histogram consisting of 1 single bar
going from 0.65 to 1.25 (very uninteresting histogram, but goo
The my.symbols and ms.polygon functions in the TeachingDemos package may help.
--
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.
Look at the zoomplot 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-boun...@r-
> project.org] On Behalf Of T
2*pi/5, length.out=5),
add=FALSE, col=2:6 )
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
From: Hemavathi Ramulu [mailto:hema.ram...@gmail.com]
Sent: Thursday, September 10, 2009 2:44 AM
To: Greg Snow
Cc: r-help@r-proje
The cat() function has already been pointed out to you (and that may be
enough), but for a little more elaborate alternative, see the txtStart and
txtComment functions in the TeachingDemos package for a glorified wrapper to
sink/cat/etc.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
I think Penkyu is not asking for the statistical definitions, but rather some
help for what the different parts of the object are. Elements like
coefficients and residuals seem fairly obvious (but could still be somewhat
ambiguous, are the residuals raw/standardized/studentized/etc.). Objects
The symbols function is base graphics which does not play nicely with lattice
graphics (without extra work).
Here is one approximation that works with lattice:
x <- runif(10)
y <- rnorm(10)
z <- runif(10, 1,5)
library(lattice)
library(TeachingDemos) # for panel.my.symbols and friends
xyplot( y
Section 11.1 and 11.4 of "An Introduction to R" gives a pretty thorough start
for aov models (does not get into mixed/survival and others).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r
It appears that you have a fundamental misunderstanding of what p-values do and
do not say (though this misunderstanding is commom). The following article
addresses this issue and could help with a better understanding:
Murdock, D, Tsai, Y, and Adcock, J (2008) _P-Values are Random
Va
Rolf,
I no longer claim to be young, the naïve part is still up for debate,
but I find that restricting the null to only include = to be more confusing
than to have it include the inequality. To have the alternative be > and the
null be = implies that we are working on the assumption
The people who brought us rexcel are working on sword which is a sweave for ms
word, the current version is at:
http://rcom.univie.ac.at/download.html
hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -O
e Lang [mailto:dun...@wald.ucdavis.edu]
> Sent: Friday, September 18, 2009 11:00 AM
> To: Greg Snow
> Cc: Tobias Sing; r help
> Subject: Re: [R] Writing Reports from R in Microsoft Office Open XML
> format (follow-up)
>
>
> I believe that their approach is based on DCOM a
Help us to help you, show us the code that you tried, what you expected, and
what you saw.
Does "using NA condition" mean:
> x == NA
Which does not work
Or
> is.na(x)
Which should.
-Original Message-
From: "premmad"
To: "r-help@r-project.org"
Sent: 9/21/09 12:38 AM
Subject: [R]
For power studies you need to think about what the data will look like under
the alternative hypothesis. Is the data shifted over a certain amount? (the
most common assumption), or scaled? Or both? Or a completely different shape?
Etc.
My preferred method for power studies in this case is to u
The current recommendation is to not put designs/hash lines/pictures/etc. into
the bars, but to use a single solid color (gray in your case). Back when a
quality graph meant using a pen plotter, hash lines made sense as a way to
distinguish between bars, but quality graphics no longer depend on
Since todays ground water may be influenced by yesterdays rainfall, you may
want to look at the dynlm package and possibly lag.plot and the zoo package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message
Try it without the '$' in the table name, that has worked for me in the past.
--
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.o
You can do this by simulation:
Generate data from a multinomial of the same length as your data (the sample
function can help) using either theoretical or observed probabilities.
Measure the length of the longest run, or the number of runs (the rle function
can help).
Repeat this a bunch of ti
What do you mean by location? I can think of examples where 2 distributions
have the same median but different means, or the same means but different
medians.
Are you willing to assume that the distributions are exactly the same under the
null hypothesis? (not just the same 'center/location')
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: John Sorkin [mailto:jsor...@grecc.umaryland.edu]
> Sent: Thursday, September 24, 2009 2:52 PM
> To: Greg Snow; r-help@r-project.org
>
, September 25, 2009 12:17 PM
> To: Greg Snow
> Cc: John Sorkin; r-help@r-project.org
> Subject: Re: [R] Non-parametric test for location with two unpaired
> sets of data measured on ordinal scale.
>
> Greg and John,
>
> Just to throw it out there, the data sets here are
Here is one way using a single pattern (so can be used in a substitution), it
uses Perl's positive look ahead patters:
> test <-
> c("SHRT","5HRT","M1TCH","M1TCH5","LONG3RS","NONUMBER","TOOLNGG","ooops.3")
>
> sub( '(?=[a-zA-Z]{0,8}[0-9])[a-zA-Z0-9]{5,9}', 'xxx', test, perl=TRUE)
[1] "SHRT"
You can sometimes fake variable width look behinds with Perl regexs using '\K':
> gregexpr('\\b[0-9]+\\K[.]', 'a. 1. a1. 11.', perl=TRUE)
[[1]]
[1] 5 13
attr(,"match.length")
[1] 1 1
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.81
poly by default uses orthogonal polynomials which work better mathematically
but are harder to interpret. See ?poly
--
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.
On Behalf Of Gabor Grothendieck
> Sent: Tuesday, June 09, 2009 11:27 AM
> To: Greg Snow
> Cc: Wacek Kusnierczyk; r-help@r-project.org; Mark Heckmann
> Subject: Re: [R] using regular expressions to retrieve a digit-digit-
> dot structure from a string
>
> Wacek already mentioned
Also triplot in TeachingDemos
--
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 David Carlson
> Sent: Friday, J
Generally when someone asks a question like this, they are trying to program in
a different language using R rather than taking advantage of the power of R
itself. If you give us more information on what you are trying to accomplish,
then we may be able to give better advice on how to accomplis
m.minoo...@meissner.com]
Sent: Monday, June 15, 2009 10:39 AM
To: Greg Snow; r-help@r-project.org
Subject: Re: Referencing data frames
You are, indeed, correct. I'm still used to the IGOR Pro programming language
(for which I even wrote an introductory manual, http://payam.minoofar.com/igor
701 - 800 of 804 matches
Mail list logo