ntax would be a problem, but to avoid it
you could use exactRankTests::wilcox.exact() which, I believe, was
written by the same author. It uses the same syntax as wilcox.test().
Note, though, that the package is no longer
being developed.
Peter Ehlers
On Thu, May 30, 2013 at 6:21 PM, Greg
uld check Wikipedia for "permutation test". There must be plenty
of online info but I'm too lazy to check.
In general is there some way to look for what function is used to calculate
the statistics?
Just look at the code of perm.test.default (it's no
ce)[2:6]
pvec <- c(lmp(fit), lmp(fit_2), lmp(fit_3), lmp(fit_4), lmp(fit_5))
use <- varnames[pvec < 0.15]
use
#[1] "tol14" "tol15"
To construct the formula:
rhs <- paste(use, collapse = " + ")
form <- paste("exposure ~", rhs)
A
calculation, see any
intro stats text or look at the code of cor.test.default().
Peter Ehlers
Prof. José Iparraguirre
Chief Economist
Age UK
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Elaine Kuo
Sent: 17 May 2013 10:40
To: r
th cases kind of zigzags. What can it be the reason? thank you!
Sort your dataframe by x-values (CHAOsep12RNA).
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
cília Carmo
According to the plyr NEWS file, mutate was introduced in
Version 1.3 (2010-12-28). I would hope that your version is
newer than that. You should tell us what the error message is.
Anyway, you can always use R's within() function instead;
or use transform() as Jean suggested.
Pe
e OP:
Install package sos and then do findFn("mode") to see what's available.
E.g. packages, pracma, asbio, dprep, rattle and many others.
Do note that they handle the multimodal situation differently.
Or, write your own, perhaps using table() and which.max().
Peter Ehlers
all1
tually 'coefficients'.
But try it for an nls model. Mynlsmodel$coefficients won't work (well,
it won't give an error but it will yield NULL).
That's why there are special extractor functions such as coef.nls,
coef.Arima, etc. For lm models, coef.default is used.
Peter Ehlers
t doesn't 'reverse' the order of the new variables.]
Suggestion 3:
Use the 'data=' argument in the plot:
boxplot(residual ~ firm, data = newdata)
Peter Ehlers
On Wed, Apr 3, 2013 at 3:38 AM, Cecilia Carmo wrote:
Hi R-helpers,
My real data is a panel (unba
On 2013-04-01 19:23, arun wrote:
gsub("\\,.*","",x)
#[1] "foo" "bar" "qux"
A.K.
No big deal, but does "," have to be escaped?
sub(",.*", "", x)
Peter Ehlers
- Original Message -
From: Gundala Vis
On 2013-04-01 15:06, Ted Harding wrote:
On 01-Apr-2013 21:26:07 Robert Baer wrote:
On 4/1/2013 4:08 PM, Peter Ehlers wrote:
On 2013-04-01 13:37, Ted Harding wrote:
Greetings All.
This is a somewhat generic query (I'm really asking on behalf
of a friend who uses R on Windows, whereas I
27;s indeed the set of names, as returned by the levels()
function.
Peter Ehlers
On Mon, Apr 1, 2013 at 2:58 PM, Bert Gunter mailto:gunter.ber...@gene.com>> wrote:
Yup. Note also:
> as.character.factor
function (x, ...)
levels(x)[x]
But of course this is OK, si
tter?
titt <- bquote("R con ventanas de " ~ .(n) ~ italic(datos))
and I usually find it much more flexible to add the title with a
separate title(titt) call.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
ll the way
back to the very first row of Chunk 1? (The size-change may perhaps
have to be determined empirically).
Isn't this set by the 'bufbytes' and 'buflines' specifications in the
Rconsole file?
Anyway, it's probably best to use 'View' to inspect data.
Pet
calculations easier.
This, however,
is an implementation issue and is not guaranteed to hold in all
implementations of R.
Hint:
f <- factor(sample(5, 10, TRUE))
as.numeric(levels(f))[f]
g <- factor(sample(letters[1:5], 10, TRUE))
as.numeric(levels(g))[g]
Peter Ehlers
[[alternativ
frame, then the first thing to check is
range(x[, 17])
It's also _always_ a good idea to check str(x) before you do anything
further with x.
Peter Ehlers
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
http
To the OP:
Sooner or later most R beginners are bitten by this all too
convenient shortcut. As an R newbie, think of R as your
bank account: overuse of $-extraction can lead to undesirable
consequences. It's best to acquire the '[[' and '[' habit early.
Peter Ehlers
ctor(s) as the function return.
Can somebody help me how to achieve that?
From help(ifelse):
"ifelse returns a value with the same shape as test"
i.e. in your case, the same 'shape' as 'x > 0', a single value.
You _could_ make ifelse() work with, e.g.,
help page!
?axis will show you how to use the 'at' and 'labels' arguments of
the axis() function.
Peter Ehlers
On Tue, Mar 19, 2013 at 2:00 PM, Rui Barradas wrote:
Hello,
Try setting the argument xaxt (x axis type) to "n" (no x axis) and then
use ?axis.
plot
Error in .overlayList(x, fun = fun, filename = filename, ...) :
cannot use this formula, probably because it is not vectorized
[...snip...]
This suggests that it might be useful to read ?Vectorize.
Peter Ehlers
__
R-hel
Forgot to mention: You might find the nlmrt package helpful but
I have no experience with that (yet).
Peter Ehlers
On 2013-03-15 07:57, Shane McMahon wrote:
I have a question regarding robust nonlinear regression with nlrob. I
would like to place lower bounds on the parameters, but when I
using the
exp(log(coef)) construct. See argument 'lrc' in ?SSasymp for example.
Introducing a shift to accommodate coef > k for given k is simple.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-he
h_2.2-9zoo_1.7-9 MASS_7.3-23
loaded via a namespace (and not attached):
[1] grid_2.15.3 lattice_0.20-13 tools_2.15.3
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
slope <- rep(NA, 72)
for(i in 6:72) {
slope[i] <- coef(lm(temp ~ time, data = d, subset = (i-5):i))[2]
}
maxslope <- max(slope, na.rm = TRUE)
idx <- which.max(slope)
Obviously, this can be extended to cover more than a 24-hour period.
Now, let's wait for Gabor to show us the
y, if you need to do this a lot, you could
create an "expression" vector:
x <- -8:-3
z <- vector("expression", 6)
for(i in 1:6) z[[i]] <- bquote(10^.(x[i]))
axis(1, x, z)
Peter Ehlers
On Wed, 13 Mar 2013, Berry Boessenkool wrote:
Hi all,
I want to label an axi
this is what you want, but you could set the
argument 'aspect' to 'fill' instead of 'iso'.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
neys. I thought they just ate kids.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
teractive placement of figures, it should be possible to
use locator() to place each plot.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/postin
: use ?update which will take you
to a link for ?update.formula where you can read all about it.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
Your code is not reproducible and
you're posting in HTML. Please give at least a cursory look at the
Posting Guide.
[... rest of code sample snipped ...]
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
order
is to have the first factor vary most rapidly, then the next, etc.
I think that's documented somewhere, but I don't know where.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Using Rui's dataframe 'dat' and pch-vector 'ch':
with(dat, plot(x, y, pch = ch[z]))
with(dat, text(x, y, lab=z, pos=3, cex=.7))
Try also pos=1,2,4 to see what suits you best.
Peter Ehlers
Date: Mon, 11 Mar 2013 21:33:33 +
From: ruipbarra...@sapo.pt
To: eliza_bo.
On 2013-03-11 06:07, Jorgen Harmse wrote:
identical(df[1,],df[2,]) is FALSE because of the row names. all( == ) is just a
work-around that I attempted.
Jorgen.
I would just wrap the elements in c():
identical( c(df[1,]), c(df[2,]) )
Peter Ehlers
On Mar 11, 2013, at 02:53 , PIKAL Petr
, victory points) each
obeying a given set of rules.
The purpose of the statistical analysis is to come up with a measure of
the strength of each card.
Any idea if "out there" there is any R package/script which can help me?
Any suggestion is welcome
Lorenzo
Why not simulate?
Pe
s that R does not have a 'date' type, so:
typeof(d)
#[1] "double"
And the for-loop results follow.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
names.col?
Error in phy$node.label[which(newNb > 0) - Ntip] : only 0's may be
mixed with negative subscripts
Looks to me like 'which(newNb > 0) - Ntip' evaluates to a
vector that has both positive and negative elements.
Like this:
x <- 1:5
x[c(-2,-4)] ## ok
x[c(-
sing this package or another designed for functional data
analysis.
Thanks,
Zoe Richards
What does your question mean? Possibly, you could 'invert' a mean
function, but I have no idea what that would accomplish. Can you
provide an example of just what
da", ylab= "Opazovane
vrednosti", type='l', col='red')
axis(side=1, at=seq(1,40,4), labels=seq(1,10,1))
Thanks in advance for any help!
Have a look at what
par("usr")
gives to see that your "at" setting makes no sense.
Peter Ehlers
__
x27;s down as the author
of pwilcox.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
On 2013-03-04 12:30, David Winsemius wrote:
On Mar 4, 2013, at 12:18 PM, Peter Ehlers wrote:
On 2013-03-04 12:04, Ista Zahn wrote:
On Mon, Mar 4, 2013 at 2:57 PM, Rolf Turner wrote:
I never saw the "original note" nor its resubmission. Nor could I find it
in the R-help archiv
On 2013-03-04 12:04, Ista Zahn wrote:
On Mon, Mar 4, 2013 at 2:57 PM, Rolf Turner wrote:
I never saw the "original note" nor its resubmission. Nor could I find it
in the R-help archives.
Is it just me?
No, same here.
Think Nabble!!!
(where there are often waits for approv
Duncan's comment may not qualify as a fortune, but it did make
me chuckle.
Peter Ehlers
On 2013-03-02 03:01, Duncan Murdoch wrote:
On 13-03-01 8:35 PM, C W wrote:
[...snip...]
pie is a function, but all it does is draw pie charts, so who cares if
you mask it? :-).
Duncan Murdoch
[..
d explore using
the factor.levels argument to strip.default().
I hope that this isn't totally out to lunch.
Peter Ehlers
On 2013-03-02 09:20, Frank Harrell wrote:
Whoops - these 2 lines should have been omitted from the program:
n <- sprintf('%s (n%s=%g, n%s=%g)', v, nam[1]
remaining when resizing
panels.
Thank you.
Elaine
[[alternative HTML version deleted]]
I think that you should provide (minimal) code to illustrate the problem.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
Re(r[is.zero(Im(r))])
+ }
r <- realroots(po.lm, 3)
predict(po.lm, newdata = data.frame(b = r)) # confirm
1
1.69
So I think there's a calculation error somehwere.
You need to replace the following line
if(names(model)[1] == "(Intercept)")
with
if(names(coef(model
ies)[panel.number()]
panel.dotplot(...)
panel.rect(xleft, ybottom, xright, ytop, fill = "bisque")
panel.text(x = (xleft + xright) / 2,
y = (ybottom + ytop) / 2,
labels = lab)
})
Peter Ehlers
__
R-h
I would just add a sufficient number of
spaces, obtained by trial and error, to each label.
On the other hand, why not use lattice's built-in facility to put
your labels in the top strips, using the factor.levels argument.
But perhaps your real use is more involved than the example.
Peter Ehle
y, get the package
off the shelf and put it on your search path.
This should do it:
library(parallel)
--
Peter Ehlers
computing on windows?
Thanks for your help.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-he
elp page a bit too hastily.
Could someone please tell me how to specify the variable types correctly?
Thank you.
Joanna
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
ot;blue"), c(2, 6) )
bwplot(voice.part ~ height, data = singer, fill = mycol)
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and
of information for
colorkey on the levelplot help page.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
unctions in the TeachingDemos package.
Peter Ehlers
(B) Suppose I have 100 pairs of (x, y ). then is it possible to display in the
graph (irrespective of the curosr position) the values of (x, y) corresponding
to say 10th, 20th, 30th, 40th etc. observations in the
x27; in place of 'TRUE' is a bad idea.
Actually, it's _always_ a bad idea.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
;s doing that as the first parameter to a `glm`
call?
Steve:
re a matrix response: see MASS (the book, 4ed) page 191; also found
in the ch07.R file in the /library/MASS/scripts folder. I seem to
recall that this is mentioned somewhere in the docs, but put my finger
on it now
DOES NOT WORK
To see what's wrong, just print the problematic part:
-c("X3", "X4", "X5")
You can't negate a character vector; you have to have a numeric vector.
And
!drop_var
doesn't work because you need something that ev
ful unless you're in the habit of processing
your data by column _number_ rather than variable _name_.
If so, I would strongly discourage that habit.
And a cursory look at str.default() suggests that it may not be
all that trivial a code change.
Peter Ehlers
__
font = 1,
tck = c(0.8, 0.6, 0.4),
distance =c(2, 5, 8)))
Adjust as you prefer.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guid
ost"
Berend
I believe that e-letter is confused by the space-saving
use of the semicolon to place two R expressions on one line.
He neither needs nor wants the ';dx2dx' in his own
expressions.
Peter Ehlers
__
R-help@r-project.org mailing
ong as his further operations
do not depend on the presence of that attribute.
Peter Ehlers
- Original Message -
From: Andre Zege
To: "r-help@r-project.org"
Cc:
Sent: Thursday, November 15, 2012 9:36 PM
Subject: [R] lubridate concatenation issue
I took a look at Hadley
utes(c(d))
You'll see that c() removes the 'tzone' attribute.
This is mentioned on the help page for POSIXct.
The only way I know to 'fix' this is to reassign the
attribute:
e <- c(d)
attr(e, "tzone") <- "UTC"
But there might a better solution to
roblem". If the populations are not Normal, I don't
see why a t-distribution would be expected.
I seem to recall that Welch included some simulation results in his
Biometrika paper (1947? 1953?; I'm getting senile). Shouldn't be
difficult to generate in R. Maybe Greg Snow's Tea
tatistical analyses.
Just use the formula version of t.test().
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Importing-Data-for-a-two-sample-t-test-tp4649565.html
Sent from the R help mailing list archive at Nabble.com.
_
ot; (to R) your preferred order.
But let's guess that 'Groups' is a factor variable and that
you have not set its levels explicitly to be what you want.
See ?levels
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Switch-Groups-in-ehplot-x-axis-tp464948
updating your R version.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
t (pointed to by ?panel.xyplot)
(type "g" indicates a grid, but the 'grid' argument is preferred.)
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http:
dification that will permit different colours for the
circles/radii is left as an exercise.
Peter Ehlers
On Fri, Oct 26, 2012 at 10:59 AM, Peter Ehlers wrote:
On 2012-10-25 14:42, Bernie Wone wrote:
Hi Peter,
Thanks for the help. Being a beginner R user with little programming
experien
ngle
instance of 'radial.plot' with 'myradial.plot' and
save the edited version as 'mypolar.plot', say. Now
use mypolar.plot() with whatever grid.lwd value suits
your purpose.
Peter Ehlers
--
View this message in context:
http://r.789695.n4.nabble.com/Grid-Wid
.
thanks in advanceeliza
I hope that you're doing _exploratory_ data analysis.
Have a look at the 'leaps' package. It might be suitable.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do r
is the t(newmat[]) line. I find it easiest to
start with a matrix of zeros, fill in the upper.tri part as you
have done, then just add newmat and t(newmat), then fix the diagonal.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.e
rder = grid.col, col = grid.bg)
segments(0, 0, xpos, ypos, col = grid.col)
and add the argument 'lty = grid.lty' to each.
Then add 'grid.lty = 1' to the function arguments.
Save the modified function as myradial.plot and source()
it into your R session and then use it with w
On 2012-10-23 15:22, bwone wrote:
Hello all,
Is it possible to change the radii line type in radial plots? I wasn't able
to find anything online.
Do please be more specific: which package's radial plot function
are you using? Package plotrix has radial.plot() with an 'lty
ate(quant ~ tclass + stream, data = benthos,
FUN = sum)
Then just use benthos2 as the data argument to barchart().
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
by(df, INDICES=df$ID, FUN=function(DF) DF[which.max(DF$week), ]))
ID week outcome
1 16 42
4 4 12 85
9 9 12 84
With the plyr package:
library(plyr)
ddply(df, .(ID), function(x) tail(x, 2))
or, slightly simpler:
ddply(df, .(ID), tail, 2)
Pe
On 2012-10-07 14:44, Sam Steingold wrote:
* Peter Ehlers [2012-10-07 10:03:42 -0700]:
On 2012-10-07 08:34, Sam Steingold wrote:
I know it does not look very good - using the same column names to mean
different things in different data frames, but here you go:
--8<---cut h
b
#3 3 6
A.K.
Yes, because 'b' is _not_ a 'by'-name.
Peter Ehlers
- Original Message -
From: Sam Steingold
To: r-help@r-project.org
Cc:
Sent: Sunday, October 7, 2012 11:34 AM
Subject: [R] a merge() problem
I know it does not look very good - using the same col
column name 'a' is duplicated in the result
--8<---cut here---end--->8---
why is the suffixes argument ignored?
I mean, I expected that the second "a" to be "a.y".
The 'suf
ds
I think what PD was trying to say is that a preferred solution would be:
plot(1,1, xlab=expression(phantom()^{32*m}*K) )
Peter Ehlers
There is some sort of parsing that splits the numeric from the alpha characters even with
no spaces intervening, so you need to "protect" the
7
Another way:
count <- sum(with(x, A*B > 5))
Peter Ehlers
Hope this helps,
Rui Barradas
Em 16-09-2012 11:41, SirRon escreveu:
Hello,
I'm working with a dataset that has 2 columns and 1000 entries. Column 1 has
either value 0 or 1, column 2 has values between 0 and 10. I wo
It may be as
simple as typing "mash" instead of "mesh" (note the second letter) as
you have done in your post. And what makes you think that there
_should_ be a function mesh()? The answer to that question may well
provide a sufficient clue to its whereabouts. Finally, searching for
like
if (!is.null(x$datamean))
Peter Ehlers
Thank you for your help.
Best regards,
Dominic
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
"Ailment",
ylab="Percent",
legend.text=TRUE,
args.legend=list("topright",title="Treatment",bg="white"),
add=TRUE)
Peter Ehlers
__
R-help@r-project.org mailing list
https
On 2012-08-31 16:03, Bert Gunter wrote:
?which ##
as in ix <- which(x==values)
-- Bert
Or maybe ?identify.
Peter Ehlers
On Fri, Aug 31, 2012 at 2:09 PM, Michael wrote:
Hi all,
I am using "locator" to select the points from a scatter plot...
This is all fine.
But the pr
#Example
d <- data.frame(g=gl(5, 10), x=rnorm(50), y=rnorm(50))
by(d[,2:3], d$g, cor, method="spearman")
It may seem a bit of overkill, but the plyr package is handy and
gives a nice output:
library(plyr)
ddply(d, .(g), summarize, correlation = cor(x, y, metho
I think that what the OP is looking for comes under the heading of
"inverse regression" or the "calibration" problem. One reference
with a simple explanation including confidence intervals is "Applied
regression analysis" by Draper and Smith. (It's in section 3.
oups = Species,
pch = 15:17, col = 2:4,
panel = "panel.superpose",
panel.groups = function(x,y,...){
panel.xyplot(x,y,...)
panel.lmline(x,y,...)
},
key = list(corner = c(1,0),
text = list(lab = levels(iris[["Species"]])),
points = list
describing the subtle behavior you kindly
pointed out.
Hmmm, it seems to me that the page is clear:
"... NA index picks an unknown element and so *returns* NA
in the corresponding element of ..."
(my emphasis)
Isn't that exactly w
t loses some attributes that you probably want to keep (e.g. the
names), but otherwise works on your example.
Duncan Murdoch
It seems that class "listof" also works:
class(x) <- "listof"
x
Peter Ehlers
x
$setosa
x[, "Sepal.Length"]
n missing
main="yadayada")
}
plotme(survived, threshold=50)
Peter Ehlers
I will try to dig into the code to see how this new parameter can be
accomodated into the code. I must confess that I am far from a pro at
this sort of stuff. I will appreciate it if I can get some help.
Howeve
s myballoonplot and use that in
your code.
While you're at it, you might remove the attach(survived)
statement and use
with(survived, myballoonplot())
Peter Ehlers
I will appreciate any help that I can get.
Thanks,
Ravi
[[alternative HTML version deleted]]
with
your favourite decompression utility.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal,
p a logical rather than numeric
flag):
vn <- transform(vn,
my_flag = ( (PM.EXP > 0) & (PM.DIST.TOT != 1) ) * 1 )
It looks as though your PM.DIST.TOT variable is meant to be
integer. If so, you might want to ensure that it is that type.
Otherwise, you might want to use Michael's s
no
problem getting what I think you expect (i.e. the four suspect cases
came out just as they should). But what my mailer provides as your
data may not be what you really have.
Oh, and get a bandage for that head bruise.
Peter Ehlers
WWHHH Why why why why why why why? Why?
(Sor
Here's another pretty straightforward solution, using the plyr pkg:
DF <- data.frame(id, month, distance, bearing)
# variables as defined in the OP
require(plyr)
DF1<-ddply(DF, .(id,month), summarize,
maxdist = max(distance),
maxbearing = bearing[which.max(distanc
Have you checked help(SSbiexp) ?
Peter Ehlers
On 2012-08-23 04:54, vincent guyader wrote:
Hi everyone,
I'm trying to perform a bi exponential Fit with the package NLS. the
plinear algorithm seems to be a good choice
see:
p<-3000
q<-1000
a<--0.03
b<--0.02
t<-seq(0:144)
I should add that you can also use the par.settings()
mechanism to set your linejoin specification on the fly:
x <- 1:4; y <- c(1,3,2,4)
xyplot(y ~ x, type = "l", lwd = 20,
par.settings = list(grid.pars = list(linejoin = "mitre")))
Peter Ehlers
On 2012-08-22
You can set grid parameters in the grid.pars component of
trellis.par.get().
x <- 1:4; y <- c(1,3,2,4)
xyplot(y ~ x, type = "l", lwd = 20) # default linejoin
## set linejoin to 'mitre'
trellis.par.set(grid.pars = list(linejoin = "mitre"))
xyplot(y ~ x,
On 2012-08-21 11:02, m p wrote:
Hello,
I have a problem writing a variable to an existing file.
Below is a part of my script and how it fails.
I can't find "create.var.ncdf" in help
You probably want 'create.ncdf'.
Peter Ehlers
Thanks for any help.
Mark
nc <-
System))
Don't forget the '*' to concatenate the quote symbols with the word.
Peter Ehlers
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posti
Thus 62 is 4.88 ~ 5 units higher than the EV.
Now calculate the probability of an outcome that is 5 units *less*
(or lower) than the EV:
pbinom(52, 112, .512)
# 0.1799121
Add the two probabilities to get:
0.2161936 + 0.1799121
# 0.3961057
and that's what binom.test() reports.
For details,
his is a" ~ test^1 ~ "of the
Emergency Broadcast System."))
or
text(x=1, y=11, expression("This is a " * test^1 * " of the
Emergency Broadcast System."))
If one is going to use plotmath expressions frequently, then these
two handy little
1 - 100 of 1253 matches
Mail list logo