ansform''.
(c) See ?reshape.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-proje
On 10/07/2009, at 5:25 PM, Gaurav Kumar wrote:
Hi Rolf,
My apologies for the inconvenience caused due to my reply @ "R-
help diges".
Thanks for providing me a clue to solve the problem .
I modify a bit to populate a list. This is throwing an error
# Error in `*tmp*`[[j]] : subscript
ce ``break'' is a reserved word, you need to do
?"break"
Then you get a normal healthy un-deprecated help page.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privi
then
testave <- apply(abind(test,test2,along=3),c(1,2),mean,na.rm=TRUE)
Note that mean() ***does*** have an na.rm argument!!!
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privi
On 16/07/2009, at 2:30 PM, Roslina Zakaria wrote:
Hi R-users,
Could anybody show me how to write a code to evaluate sum(z[i] + sum
(k[j]*(z[i])^(k[j])), i=1 to 4, j=0 to infinity) ?
No. No-one can. It is conceptually impossible.
(a) Computers cannot do infinite sums; they can only do fin
trix(c(0.017511063,0.017819918,0.017944472),ncol=1)
rownames(y) <- 10:12
y
}
(Translation: Your question makes absolutely no sense at all.)
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged a
[1] TRUE
> y <- 3+eps
> y==round(y)
[1] FALSE
This is of course due to the exigencies of how n and m are represented
in floating point arithmetic. Not too deep once you're aware of the
problem, but it can still be a ``gotcha'' if one is not alert.
(Be alert. The world n
On 21/07/2009, at 5:30 AM, 1Rnwb wrote:
Please explain me as what it means and how this analysis can be
done using R
and which library(ies) are needed.
Thanks
Go stick your head in a pig! (***)
cheers,
Rolf Turner
(***) Motto of the Sirius Cybernetics
rix(rnorm(100),25,4)
> S <- var(X)
> x <- rnorm(4)
> mahalanobis(x,rep(1,4),S)
[1] 6.082543
cheers,
Rolf Turner
##
Attention:\ This e-mail message
nformation.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
ication that this is the first value returned
and the other two were blanks so you did not see them. Also "" is
just that; a blank and not NA.
Strictly speaking --- or maybe even not so strictly --- a ***null
characte
data[,18]
respectively).
Can I use cbind to do this (without losing my column names) or is
there
another way?
Just do
data <- data[,c(1:6,18,7:17)]
cheers,
Rolf Turner
##
Attention:\
have a large number of
individual objects floating around in your work space, which is what
your method does.
I would suggest that you learn about lists and the techniques for
addressing and extracting their components. It will pay off in saving
you a great deal of t
g and
naive to
expect anova() to work at all in such circumstances?
The error thrown is:
Error in anova.glmlist(list(object, ...), test = test) :
(list) object cannot be coerced to type 'double'
cheers,
Rolf Turner
##
The function lme() is in the package nmle, ***not*** in lme4.
The somewhat analagous (but very different) function in lme4
is lmer().
cheers,
Rolf Turner
Hi all,
I have a problem with package installing in Windows, on my PC
machine. The
end goal is to be able to
Thank you. That clarified a great many things.
cheers,
Rolf
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-project.
cale() seems additionally bizarre.
VERY strange behavior.
Your behavior might be seen as VERY strange by some.
I concur, heartily. Conflating NA with 0 is a first year student error
that is almost never anything other than just plain silly.
c
lieve) pretty stringent conditions --- like multivariate
Gaussianity? ---
on your data, which are unlikely to be satisfied. (Else why are you
using SVM
techniques in the first place?) Frank Harrell might have something
useful --- or
caustic (or both) -
On 3/08/2009, at 1:48 PM, David Winsemius wrote:
On Aug 2, 2009, at 7:29 PM, Rolf Turner wrote:
On 3/08/2009, at 11:14 AM, David Winsemius wrote:
On Aug 2, 2009, at 7:02 PM, Noah Silverman wrote:
Hi,
It seems as if the problem was caused by an odd quirk of the
"scale"
On 3/08/2009, at 3:43 PM, David Winsemius wrote:
On Aug 2, 2009, at 10:46 PM, Rolf Turner wrote:
On 3/08/2009, at 1:48 PM, David Winsemius wrote:
On Aug 2, 2009, at 7:29 PM, Rolf Turner wrote:
On 3/08/2009, at 11:14 AM, David Winsemius wrote:
On Aug 2, 2009, at 7:02 PM, Noah
s it ``dangling'' and hence ``unexpected''.
The following wee adjustment works:
tclass <- "Testing 1 2 3"
if(tclass == "Testing 1 2 3")
{
cat("Testing", tclass, "\n")
} else {
cat(tclass, "\n")
one newer to R seems appropriate as a fortune).
Second the nomination.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
___
ortune?
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-project.org mailing list
https://stat.e
0
>
> Is there any?
>
> I am aware of cumsum(), which will yield
> 3
> 5
> 6
> 11.
>
> But it is not what I want.
rev(cumsum(rev(c(x,0
[1] 11 8 6 5 0
?rev
cheers,
Rolf Turner
##
give any results?
If either of these commands gives a result, then you *have* ctable. The reason
that pdflatex isn't finding it may relate to your tex search path (controlled by
the environment variable TEXINPUTS) --- but normal
quote=FALSE)
# Check:
gorp <- read.csv("mung.csv")
all.equal(gorp,clyde)
[1] TRUE
HTH
cheers,
Rolf Turner
##
Attention:
This e-mail message is privileged and confidential. If you are n
plot is produced.
If I do dev.off(), then normal plotting recommences. Can anyone explain
to me what is going on here? My session info is given below. I run R
from the command line, from a terminal window.
cheers,
Rolf Turner
> sessionInfo()
R version 2.10.1 (2009-12-1
doesn't work if you have both NAs and NaNs in your data frame and you
want to distinguish between these. I.e. when you read the data back in,
all NAs will have been converted to NaNs.
Admittedly the OP said he wanted to represent all NAs as NaNs, so your
solution would seem to work for him.
s^2 * degf,na.rm=TRUE)/total.degf)
would do the trick.
It's probably not worth the effort, but.
cheers,
Rolf Turner
##
Attention:
This e-mail message is privileged and confidential. If you are not the
intended r
o ``naturally'' you get a result with 4 rows.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-project.
> returns me:
>> as.Date(40182)
> [1] "2080-01-06"
> Why don't I get the same thing as in excel?
Because excel is a load of junk.
cheers,
Rolf Turner
##
Attention:
This e-mail mess
kages:
[1] datasets utils stats graphics grDevices methods base
other attached packages:
[1] misc_0.0-12fortunes_1.3-7 MASS_7.3-4
cheers,
Rolf Turner
On 26/03/2010, at 9:47 AM, Joshua Wiley wrote:
> Dear Anna,
>
> Rolf's explanation not withstan
I think that
riffle <- function (a,b) {
n <- min(length(a),length(b))
p1 <- as.vector(rbind(a[1:n],b[1:n]))
p2 <- c(a[-(1:n)],b[-(1:n)])
c(p1,p2)
}
does the trick, and is pretty simple
cheers,
On 26/03/2010, at 11:21 AM, Nordlund, Dan (DSHS/RDA) wrote:
> Rolf,
>
> I tried the same thing at first, and got the same error. So I suspect Anna
> didn't really use that code either. :-)
Thanks! That helps to sooth my paranoia. :-)
cheers,
Rolf
##
On 26/03/2010, at 12:23 PM, Achim Zeileis wrote:
> Sorry for coming so late to this thread. One possible explanation for the
> R side is the following...
>
>
> On Thu, 25 Mar 2010, Marc Schwartz wrote:
>
>> On Mar 25, 2010, at 5:41 PM, Joshua Wiley wrote:
>>
Kind of off the thread a bit
what the issues are. Also the
answer, if there is a meaningful one, is likely to be machine dependent rather
than R dependent.
cheers,
Rolf Turner
##
Attention:
This e-mail message is privileged and conf
columns of the data frame xxx before
printing it. There is almost surely nothing ``off the peg'' that does
exactly what you want.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is pri
On 29/03/2010, at 1:27 PM, Jeff Brown wrote:
>
> What is the function "set()"? Is that a typo? When I type ?set I get
> nothing, and when I try to evaluate that code R tells me it can't find the
> function.
Yeah, it's a typo. (S)he meant ``subset'
efore the figure.
cheers,
Rolf Turner
##
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or op
Rick Becker and their
ilk.
cheers,
Rolf Turner
##
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views o
the advice I already recievd.
But ***please*** say ``load *package*'', not ``load library''. The
*location* (collection of packages) from which you wish to load the
given package is the ``library'
On 30/03/2010, at 10:04 PM, Barry Rowlingson wrote:
> On Tue, Mar 30, 2010 at 2:42 AM, Rolf Turner wrote:
>
>> Well then, why don't you go away and design and build your own statistics and
>> data analysis language/package to replace R? You can then make whatever
>&
; (available at the
entry for spatstat under contributed extension packages on CRAN).
For item 2) you may find the inside.owin() function in spatstat useful.
cheers,
Rolf Turner
##
Attention:\ Th
ould be readable by programmers who are not
> really familiar with R, but I hate to use for-loops as I have pretty huge
> datasets. Anybody an idea?
> thank you in advance.
?"%in%"
cheers,
Rolf Turner
##
``c( )'' is doing for you in
the construction ``c('phenotype')'' etc. ???
Such complete misunderstanding of what the c() does or is useful
for exasperates me, and is unfortunately very wide spread. If people
are going to use R, why don't they le
On 28/09/2009, at 11:51 AM, David Winsemius wrote:
apply(x, 2 , I)
***Much*** sexier than my solution!
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and
if bar() is called
from the
command line, rather than being called by foo() or clyde(). This is
acceptable.
I think
Any avuncular advice from those younger and wiser than myself? :-)
cheers,
Rolf Turner
##
ll always be
called by a named function. Still, it's something to keep in mind.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
ric, character, or logical) scalars.
You *can* have a *list* of functions; this might be the way you
want to go.
To ``change "mean" to the function mean'' --- set ?get.
cheers,
Rolf Turner
#
On 28/09/2009, at 4:30 PM, David Winsemius wrote:
On Sep 27, 2009, at 11:07 PM, Rolf Turner wrote:
On 28/09/2009, at 3:36 PM, trumpetsaz wrote:
I am trying to write a function that will have an input of a vector
of
functions. Here is a simplistic example.
sumstats <- c(mean,sd)
sumst
R. Can someone explain to
me why the values for a function would be different in R? Thanks,
Chris Carleton
Presumably because you were using poly() with the argument "raw" left
equal to its default, i.e. FALSE.
cheers,
Rolf Turner
P. S. The posting guide asks
-line.
(1) Please be aware that these are ***NOT*** probabilities that you
after. The
values of a density function are, strange to tell, probability
***densities***
and not probabilties.
(2) Look at the help for density(). I.e., RTFM.
cheers,
Rolf Turner
ccc <- coef(fit)
X <- cbind(1,x,x^2,x^3)
print(fitted(fit))
chk <- X%*%ccc
print(chk[!is.na(chk)])
print(range(fitted(fit)-chk[!is.na(chk)]))
[1] 0.00e+00 5.456968e-12
The answers are the same.
cheers,
Rolf Turner
###
able. Into your sft() function you can place
whatever
technique you think appropriate for handling missing values. It is
not at all
clear to me that anything appropriate is possible.
cheers,
Rolf Turner
##
A
On 30/09/2009, at 9:15 AM, milton ruser wrote:
May be this:
FRAME <- FRAME[-c(NAME1, NAME2)]
or
FRAME<- subset(FRAME, select=(-NAME1, -NAME2))
This is ridiculous advice. Try things out before you suggest them.
cheers,
Rolf
. And that is precisely the
situation in which one would wish to apply this sort of
technique.
cheers,
Rolf Turner
On Tue, Sep 29, 2009 at 4:27 PM, Rolf Turner
wrote:
On 30/09/2009, at 9:15 AM, milton ruser wrote:
May be this:
FRAME
On 30/09/2009, at 10:25 AM, Duncan Murdoch wrote:
On 29/09/2009 4:54 PM, Rolf Turner wrote:
On 30/09/2009, at 9:32 AM, milton ruser wrote:
x=runif(12)
y=runif(12)
w=runif(12)
mydf<-data.frame(cbind(x,y,w))
head(mydf)
mydf<-subset(mydf, select=c(-x,-w))
head(mydf)
Bu
;- 0.3
?
You have told the answer already, several times.
***FLOATING POINT ARITHMETIC
If you still don't understand, read up on it. Start by looking at
the FAQ.
cheers,
On 2/10/2009, at 12:05 PM, Bert Gunter wrote:
However, I would hazard the guess that doing this is a (possibly
disastrously) bad idea
I heartily second that hazard!!!
cheers,
Rolf Turner
Bert Gunter
Genentech Nonclinical Biostatistics
On 2/10/2009, at 1:03 PM, Carvalho, Benilton wrote:
I agree with you folks, my assumption is that the user knows what he's
doing.
Almost surely a rash assumption! (I.e. except for a set of
users of probability zero.) :-)
cheers,
/waterdata.usgs.gov/nwis/uv?
format=rdb&period=7&site_no=021973269",skip=26)
names(y) <- names(x)[1:7]
This ***appears*** to give a reasonably sensible data frame.
Is this anything like what you want?
cheers,
Rolf
t to accomplish, but it's possible
that setting nomatch=0 in your call to match() might get you somewhere.
Note that xxx[c(0,1,2,3] gives xxx[c(1,2,3)] whereas
xxx[c(NA,1,2,3)] gives c(NA,xxx[c(1,2,3)]).
cheers,
w when you type xx$v1 you see the sequence b b b a a a c c c.
The call
xx$v1 <- factor(xx$v1,levels=c('b','a','c'))
(done ***instead*** of the the call levels(xx$v1) <- c('b','a','c'))
essentially replaces
'1 1 1 1 1' ?
No. Not unless you specify different breaks.
Is there any other function to count frequency of discrete data?
table()
cheers,
Rolf Turner
###
7;.
Is there any way to get around this?
Thanks.
?get
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-proje
for gee() and delete or
comment out the offending message() and print() statements. Or prepend
them by ``if(!silent)'' which would cause silent=TRUE to shut them up.
Fortunately, since this is R, it's easy enuff to do.
HTH.
cheers,
Rolf Turner
P. S. I g
thing else entirely that's wanted
cheers,
Rolf Turner
On 14/10/2009, at 7:47 AM, Duncan Murdoch wrote:
On 10/13/2009 2:35 PM, Len Vir wrote:
Hi,
I'm trying to model an ARMA(1,[1,4]),
i.e. I want only lags 1 and 4 of the Moving Average part.
It's the '
the lattice package:
cloud
Error: object 'cloud' not found
What did I do wrong?
You didn't ***load*** the package, i.e. you didn't do
library(lattice)
cheers,
Rolf Turner
##
(Pace Barry Rowlingson! :-) )
cheers,
Rolf Turner
?str may also be useful..
str is indeed useful --- but not here.
R. T.
bests
milton
On Sun, Oct 18, 2009 at 11:10 PM, ANJAN PURKAYASTHA <
anjan.purkayas...@gmail.com> wrote:
Hi
're looking for.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-project.org mailing list
https://stat.ethz
ALSE),2000,TRUE,prob=c(0.8,0.2))
Then do the three lines between # Begin and # End. Then do
plot(m)
to make sure it looks as it should.
There may be a sexier way of accomplishing the task. If there is,
perhaps Adrian will chip in.
HTH.
cheers,
Rolf Turner
###
particular bag?
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-project.org mailing list
cheers,
Rolf Turner
Date: Wed, 21 Oct 2009 14:20:08 -0400
From: da...@revolution-computing.com
To: ohri2...@gmail.com
CC: r-help@r-project.org
Subject: Re: [R] News on R "s largest corporate partner REVolution
Computing and SPSS CEO:
It is clearly inappropriate f
.)
Anyway this is a very convoluted way of going at the problem. Why
not just generate random numbers between 0 an 1 ``directly'', using
runif()?
cheers,
Rolf Turner
##
Attent
On 22/10/2009, at 8:37 AM, Barry Rowlingson wrote:
On Wed, Oct 21, 2009 at 8:09 PM, Charles Annis, P.E.
wrote:
David:
Do you mean "inappropriate" or "embarrassing?"
How would we R-ians know what has happened at REVolution were it
not for
Ajay's note? Were you planning a press release? S
On 22/10/2009, at 11:16 AM, Erin Hodgess wrote:
Dear R People:
Suppose I have the following output:
table(xx)
xx
A C G T
13 12 10 15
I would like to have the output sorted in descending order by "height"
or frequency.
But when I do the following:
rev(table(xx))
xx
T G C A
15 1
stepwise in Bayesian analysis is like asking for some
nuclear waste on your ice cream sundae.
More like asking for petro-chemical waste in your nuclear waste!
cheers,
Rolf Turner
#
vation + slope + vegtype"))
mxl <- randomForest(fmla,data=moths.train)
Have tested the construction of ``fmla'' --- that works. I don't know
from randomForest(), so I haven't tested that bit.
HTH.
cheers,
On 27/10/2009, at 7:58 PM, Peter Ehlers wrote:
... if one doesn't understand the output of lm(), then one's
knowledge of statistics is insufficient to warrant using lm().
I nominate this as a fortune.
cheers,
R
obably turn it up for you.
Alternatively you can use the facility:
http://win-builder.r-project.org
which is provided by Uwe Ligges, bless his heart. Remember this
is necessary only if ``mystuff'' depends on C or
#x27; is to stink.)
the greatest havoc on the statistical analysis?
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged
?get
On 29/10/2009, at 11:25 AM, skyjo wrote:
Hello. I am trying to write an interactive function that asks the
user for a
vector of observations. Unfortunately, if a user inputs a vector, R
treats
the vector name as a string instead of a variable. Here is an example:
vector.input<-fun
On 29/10/2009, at 11:13 PM, premmad wrote:
My R crashes frequently when run with huge data.
Isn't that ***fascinating***!!!
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privi
ot;y"))
expression({
.value <- x^2 + y^3
.grad <- array(0, c(length(.value), 2L), list(NULL, c("x",
"y")))
.grad[, "x"] <- 2 * x
.grad[, "y"] <- 3 * y^2
you are trying to answer.
cheers,
Rolf Turner
##
Attention:
This e-mail message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sende
(b) If indeed the situation has changed (or perhaps even
if it hasn't) shouldn't that line ``only document a ***single***
data object per Rd file'' be deleted from ``Writing R Extensions''?
On 2/11/2009, at 5:27 PM, Erin Hodgess wrote:
Dear R People:
I have the output from an arima model fit in an object xxx.
I want to verify that the ma1 coefficient is there, so I did the
following:
xxx$coef
ar1ar2ma1 intercept
1.3841297 -0.4985667 -0.996 -0.109
box, rather than to the plane z=0?
I thought that the "zero.scaled" argument (for panel.3dscatter())
might be the ticket here, but when I pass this argument to cloud()
I get an error ``Error using packet 1 formal argument "zero.scaled"
matched by multiple actual arguments"
On 5/11/2009, at 6:49 PM, Deepayan Sarkar wrote:
On Tue, Nov 3, 2009 at 3:57 PM, Rolf Turner
wrote:
(1) Is there a (simple) way of getting cloud() to do *both*
type="p" and type="h"? I.e. of getting it to plot the points
as points *and* drop a perpendicular line to
and Hall,
1990) has some relevance.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-proje
Have you looked at the read.xls() function from the gdata package?
It automates the conversion to *.csv for you. It has worked seamlessly
for me on the occasions on which I've needed to use it.
cheers,
Rolf Turner
On 19/11/2009, at 9:09 AM, Mark W. Miller wrote:
elation function at values of r > 25 does not guarantee that
reasonable
estimates of these values can be found from the data that you have
available.
cheers,
Rolf Turner
###
message when I try your example.
I get
[1] " a s d f + , j k l ? "
Of course that's not what you want, though.
(b) You need to escape the question mark:
> gsub("\\?", " ", x)
yields
[1] "asdf+,jkl "
which I think *is* what you want.
0.1'' appears in the window labelled
``No Proxy for:''.
This is all Mac stuff, and it's not at all clear to me that it will
translate to the
Linux setting, but it *might* give you somewhere to start. Good luck.
cheers,
Rolf Turner
#
ar + 6
melvin <- format(clyde,"%m/%d/%Y")
This seems to me however to be a bit of a kludge. Is there a way of
converting a character vector of dates to a POSIXlt/POSIXct/Date/
whatever
object and then adding 6 years to the latter object
How about:
z2 <- numeric(length(z1)+length(id))
z2[id] <- NA
z2[!is.na(z2)] <- z1
A bit kludgy, but it appears to work.
cheers,
Rolf Turner
##
Attention:\ This e-mail
You should do your own homework.
cheers,
Rolf Turner
On 1/12/2009, at 10:37 AM, susan jacobs wrote:
Census from 1990 california in USA. It’s a data frame with data
from 20640
zones from Califórnia. Zones are chosen as being geograficly near,
wich one
with 1500
implify=FALSE is needed just in case there is at most one entry of
x for each level of ff, in which case tapply will return an array with
NAs in it, rather than a list with NULL entries corresponding to
empty cells,
unless simpli
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listi
ird chocolate from a box of chocolates and that third chocolate.
cheers,
Rolf Turner
##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
_
601 - 700 of 2111 matches
Mail list logo