On Sep 9, 2011, at 03:51 , Jeff Newmiller wrote:
> The diff function would be helpful.
...or not:
> sum(ppois(0:1000, lambda=2.345, lower=F))
[1] 2.345
(if this was homework: the hard bit is to figure out _why_ this works.)
> annie Zhang wrote:
>
> Hi All,
>
> How can I get the expected v
Sigh
Homework?
-- Bert
On Thu, Sep 8, 2011 at 6:47 PM, annie Zhang wrote:
> Hi All,
>
> How can I get the expected value from a discrete cdf? Is there any R
> function that can do this?
>
> Thanks,
> Annie
>
> [[alternative HTML version deleted]]
>
> __
Hi Chintau,
For A, try
# some data
set.seed(123)
X <- matrix(rnorm(1013*6), ncol = 6)
group <- rep(0:1, each = 3)
# option 1
result <- apply(X, 1,
function(x) wilcox.test(x ~ group, paired = TRUE)$p.value)
result
# option 2
res <- rep(NA, NROW(X))
for(i in 1:NROW(X)){
res[i] <- wilcox.
Hi,
Two queries, if I may ask:
A. I wish to retrieve the p-values from wilcox test for EACH gene --- such
that Samples 1-3 is considered as one group while the rest remains in the
other group.
There is 1013 genes in the dataframe as attempted to exemplify in the table
below.
Would:
tapply(mpg,list(year,manufacturer), function(x) length(unique(x)))
do what you are trying to accomplish? Or do you need very specific subsets?
If so, you can do:
year<-c(rep(1980,4),rep(1981,4))
manufacturer<-rep(c('A','B'),4)
mpg<-sample(c(1:2),8,replace=T)
guc<-function(x,y,z){length(u
Hi,
I am using RExcel and trying to pass a line of code into R. When I select
the cell and choose "Run Code" from the RExcel menu then it seems to work
fine.
The problem I face is a need to write a macro to do this operation, as I
need to set up a user interface in excel for other users who don't
On Sep 8, 2011, at 8:21 PM, Adam Pridgen wrote:
Hello,
I am trying to pass a conditional expression into an expression to be
evaluated when ever an R statement is called. For example:
get_unique_count <- function(df, select, field){
uniqs <- unique(subset(df, select)[field])
return (nrow
Hi R experts,
I'm looking for some help with plotting vectors from envfit in vegan, onto a
3d plot using ordiplot3d. So far I have
data.mds <- metaMDS(data, k=3,trace = FALSE)
vect_data<-envfit(data.mds,vegdata[,3:21],choices=1:3,permu=)
ordiplot3d(data.mds,envfit=vect_data)
ordixyplot(data.m
Hello,
I am trying to pass a conditional expression into an expression to be
evaluated when ever an R statement is called. For example:
get_unique_count <- function(df, select, field){
uniqs <- unique(subset(df, select)[field])
return (nrow(uniqs))
}
In this case select is a conditional
This is a probably a daft question, but I would appreciate some help.
I want to attempt to separate groups in a dataset using discriminant
function analysis, and have been using linear discriminant analysis
(lda(klaR)) and canonical discriminant analysis (candisc(candisc)).
# CDA:
iris.mod <- lm(
The diff function would be helpful.
---
Jeff Newmiller The . . Go Live...
DCN: Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Contro
Hi All,
How can I get the expected value from a discrete cdf? Is there any R
function that can do this?
Thanks,
Annie
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
Hi there,
It seems you got no answer. Maybe providing a reproducible example
would help, as well as expressing your problem in more general terms.
I am not an expert in sampling, but I would suggest (as does the help
for sample) that you take a look at the sampling package, available on
CRAN, and t
On 09/09/11 11:36, Totally Inept wrote:
First of all, let me apologize, as this is probably an absurdly basic
question. I did search before asking, but perhaps my ineptitude didn't allow
me to apply what I read to what I'm doing. Totally new to R, and haven't
done any code in any language in a lo
It's probably easiest to think of this as a compound map (doctor -> dept
code -> factor -> character -> integer -> dept code -> dept name as
character) and to treat the code as such: if you already have R objects with
the codes in them, it shouldn't be hard to do the transformation.
Consider the f
First of all, let me apologize, as this is probably an absurdly basic
question. I did search before asking, but perhaps my ineptitude didn't allow
me to apply what I read to what I'm doing. Totally new to R, and haven't
done any code in any language in a long time.
Basically I've got categories. T
On Sep 8, 2011, at 6:38 PM, Andra Isan wrote:
Hi All,
I am plotting different lines in my graph and the problem I have is
that if the first plot has smaller y value than the second plot, I
will not be able to see the the top part of the graph. I do the
following:plot(p1, avg="vertical", l
Hi All,
I am plotting different lines in my graph and the problem I have is that if the
first plot has smaller y value than the second plot, I will not be able to see
the the top part of the graph. I do the following:plot(p1, avg="vertical",
lwd=3, col="red", main ="all graphs")plot(p2, avg="ve
Oh now wait a minute. If THATs considered old, what's next -- punch
cards? CDs?
cur - who knows the answers to that question and accepts the mantle of
authority conferred by time, though he may not actually live up to it.
> From: Marc Schwartz
>
> Oh I knew that Carl?still "ST".
>
> I am o
Oh I knew that Carl…still "ST".
I am old enough to have watched STTOS when it first aired in 66 and did.
I'll leave it at that, as we stray further OT… :-)
Regards,
Marc
On Sep 8, 2011, at 5:12 PM, Carl Witthoft wrote:
> Unfortunately for the attribution, "Make it so" is from STTNG, not STT
Unfortunately for the attribution, "Make it so" is from STTNG, not
STTOS.
This correction brought to you by the husband of a major Trekker-nerd.
>>> Seems like the most appropriate way now. I'll make it so!
>
> Very apropos on the 45th anniversary of Star Trek. :-)
>
>>> Thanks for your help
Hi Gene,
Your cue to the profile was right. This line in my .Rprofile is the culprit:
makeActiveBinding(".",function() .Last.value,env=.GlobalEnv)
It's unfortunate, because I really like that feature (typing . to get the value
returned by the last executed command).
Thanks
Dominic
> Are you
# install.packages('sos')
library(sos)
findFn('radar plot')
gets 29 hits on my system. The two that seem to be the most relevant
are radarchart() from the fmsb package and, as mentioned in the other
reply, stars() from the autoloaded graphics package.
BTW, read the quoted text and observe how you
searchhist = function(pattern){
histfile = tempfile()
savehistory(histfile)
myHist = readLines(file(histfile))
ret = myHist[grep(pattern, myHist)]
return(ret)
}
searchhist('data')
searchhist('^lm')
searchhist('hist')
On Thu, Sep 8, 2011 at 12:03 AM, andrewH wrote:
> Is there
Steve,
Just below are some examples that I hope will help.
With regard to what you've tried, I don't see any reason for using with(),
or the select argument to subset(). They both look unnecessary to me.
## examples of subsetting date-time values
## create fake data
tmp <- seq(as.POSIXct('2011-0
On 11-09-08 2:21 PM, andrewH wrote:
Dear Sarah--
I am thinking mainly in terms of long programs run by cut-and-past or some
other batch-like submission, where you can get back a lot of code, some
program outputs, and some error messages, all in a big lump. I want tl look
through that lump to lo
>From the plotmath help page:
"Control characters (e.g. \n) are not interpreted in character strings
in plotmath, unlike normal plotting."
In other words, "you can't do that".
However, since you're using grid graphics, this thread from the
ggplot2 group might be helpful:
http://groups.google.com
Are you doing something in your profile.site file or loading a package that
masks "load"?
It seems that you're deparsing (or parsing, I can never remember which is
which) the literal results of the load function.
Does it work if you do this?
save(a, file='a.RData')
On Thu, Sep 8, 2011 at 12:24
Erin,
I haven't used Rweb recently. The URL is
http://www.math.montana.edu/Rweb/ . If you have a server, you could set
up the server version of RStudio: http://rstudio.org/download/server .
It worked well when I tried it.
Best,
Matt
On Tue, 2011-09-06 at 17:07 -0500, Erin Hodgess wrote:
> Dea
On 09/09/11 06:46, Spencer Graves wrote:
I'd rather ask a stupid question than make a stupid mistake.
Fortune?
cheers,
Rolf Turner
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
On Sep 8, 2011, at 4:41 PM, Marc Schwartz wrote:
On Sep 8, 2011, at 3:09 PM, David Winsemius wrote:
On Sep 8, 2011, at 3:54 PM, Marc Schwartz wrote:
On Sep 8, 2011, at 2:42 PM, David Winsemius wrote:
On Sep 8, 2011, at 3:35 PM, Alexander Engelhardt wrote:
Am 08.09.2011 20:48, schrie
Your example works without error for me; R version 2.13.1 Patched
on Ubuntu Linux. No idea why you are having problems.
cheers,
Rolf Turner
On 09/09/11 05:24, Monsieur Do wrote:
> I've seen a number of issues with the loading of workspaces discussed
> previously, but here's
On Sep 8, 2011, at 3:09 PM, David Winsemius wrote:
>
> On Sep 8, 2011, at 3:54 PM, Marc Schwartz wrote:
>
>>
>> On Sep 8, 2011, at 2:42 PM, David Winsemius wrote:
>>
>>>
>>> On Sep 8, 2011, at 3:35 PM, Alexander Engelhardt wrote:
>>>
Am 08.09.2011 20:48, schrieb Marc Schwartz:
> Th
Both ??radar and ??spider return ?stars.
2011/9/8 XINLI LI :
> Dear R Group:
>
> Based on the following data, how to do a great Spider (Radar) Plot? Any
> advice is greatly appreciated.
>
> HospID Rate Age Charlson NIHSS 1 0.2 49 3.5 0 2 0.1 48 1.8 12 3 0.4 56
> 2.1 5 4 0.3 77 0 7 5 0.2 67 6
Try altering your subset operation from this:
with(DataSet, subset(DataSet, DataSet$NewDateTime < '2004-08-05 14:15:00'))
to this:
with(DataSet, subset(DataSet, DataSet$NewDateTime < as.POSIXct('2004-08-05
14:15:00')))
and see if you get the desired effect.
The statement DataSet$NewDateTime <
Hi:
You could try something like this:
# rbind the two melted data frames:
comb <- rbind(mat2, tab2)
# create a group factor to distinguish the two data sets
comb <- mutate(comb, gp = factor(rep(1:2, each = 1)))
# Generate the plot:
ggplot(comb) +
geom_freqpoly(aes(x = value, y = ..dens
Dear R Group:
Based on the following data, how to do a great Spider (Radar) Plot? Any
advice is greatly appreciated.
HospID Rate Age Charlson NIHSS 1 0.2 49 3.5 0 2 0.1 48 1.8 12 3 0.4 56
2.1 5 4 0.3 77 0 7 5 0.2 67 6.5 3 6 0.1 62 4.8 4.6 7 0.1 64 12 5.2 8 0.3 61
3 2.8 9 0.15 69 4.5 1.9 1
Dear R Community,
I am new to R, and have a question that I suspect may be quite simple but is
proving a formidable roadblock for me. I have a large data set that
includes water-quality measurements collected over many 24-hour periods.
The date and time of sample collection are in a combined Dat
On Thu, Sep 8, 2011 at 12:10 PM, Brian Smith wrote:
> Hi,
>
> Thanks for the reply. For the combined plot, if I use:
>
> ggplot(comb2) + geom_freqpoly(aes(x = value,
> y = ..density.., group = X2))
>
>
> I get the same colour for both the sets of distributions.
That is bec
On Sep 8, 2011, at 3:54 PM, Marc Schwartz wrote:
On Sep 8, 2011, at 2:42 PM, David Winsemius wrote:
On Sep 8, 2011, at 3:35 PM, Alexander Engelhardt wrote:
Am 08.09.2011 20:48, schrieb Marc Schwartz:
There was a post from Martin Maechler some years ago and I had to
search a bit to find
On Sep 8, 2011, at 2:42 PM, David Winsemius wrote:
>
> On Sep 8, 2011, at 3:35 PM, Alexander Engelhardt wrote:
>
>> Am 08.09.2011 20:48, schrieb Marc Schwartz:
>> > There was a post from Martin Maechler some years ago and I had to search a
>> > bit to find it. For these sorts of issues, I typi
On Sep 8, 2011, at 3:35 PM, Alexander Engelhardt wrote:
Am 08.09.2011 20:48, schrieb Marc Schwartz:
> There was a post from Martin Maechler some years ago and I had to
search a bit to find it. For these sorts of issues, I typically
trust his judgement.
>
> The post is here:
>
>https://
Am 08.09.2011 20:48, schrieb Marc Schwartz:
> There was a post from Martin Maechler some years ago and I had to
search a bit to find it. For these sorts of issues, I typically trust
his judgement.
>
> The post is here:
>
>https://stat.ethz.ch/pipermail/r-help/2003-April/032471.html
>
> His
There was a post from Martin Maechler some years ago and I had to search a bit
to find it. For these sorts of issues, I typically trust his judgement.
The post is here:
https://stat.ethz.ch/pipermail/r-help/2003-April/032471.html
His solution also handles complex numbers.
HTH,
Marc Schwartz
Have you looked at www.r-project.org -> books? Also,
"www.r-project.org -> CRAN (select a mirror) -> Documentation:
Contributed" includes a variety of documents that are free and
potentially quite helpful.
Also, I wouldn't be shy about asking co-workers for suggestions.
(I'd ra
Have a close look at ?storage.mode and ?typeof.
The problem here, as usual and as you seem to allude is: define
"integer" . Mathematically, there is an unequivocal definition, but
not so in finite precision arithmetic. Are you referring to the
machine representation (typeof()), or the approximate
Jeff Newmiller and Dennis,
As always, very helpful. I appreciate the comments on how best to organize
the code as well. Simplifies things greatly.
Thanks,
Nate
On Wed, Sep 7, 2011 at 3:33 PM, Dennis Murphy wrote:
> Hi:
>
> For your test data, try this:
>
> # Result of dput(NerveSurv)
> NerveSu
On Sep 8, 2011, at 19:03 , Albyn Jones wrote:
> Look at
>
>area <- sum(a$y)*(a$x[1]-a$y[2])
>
> The problem appears to be "a$x[1]-a$y[2]"; that is not the length of
> the base of an approximating rectangle, whatever it is :-)
I would assume that that is just a typo for a$x[1]-a$x[2], which
Hello Alex,
Have you tried the modulus operator?
> 2 %% 1
[1] 0
> 2.1 %% 1
[1] 0.1
~Jason
On 2011.09.08 20:27:14, Alexander Engelhardt wrote:
> Hi,
>
> x <- 0.2*5
> is.integer(x)
>
> gives me FALSE because R stores it as a float number, right?
> Is there an elegant way to work aroun
Thanks Eik!
I did not know about or remember history. I agree that it solves part of my
problem, but I really want to be able to search my code and the things R has
printed in response as a single block of text. I can cut-and-paste it into a
text editor, but I was hoping that there was a way to do
"Brian Jensvold" het geskryf
I am trying to create a classification tree using either tree or rpart
but when it comes to plotting the results the formatting I get is
different than what I see in all the tutorials. What I would like to
see is the XX/XX format but all I get is a weird decimal val
Hi,
x <- 0.2*5
is.integer(x)
gives me FALSE because R stores it as a float number, right?
Is there an elegant way to work around that problem? Right now
I'm using
x <- 0.2*5
round(x) == x
which returns TRUE. But more strictly I should use all.equal(),
right?
I somehow just don
Dear Sarah--
I am thinking mainly in terms of long programs run by cut-and-past or some
other batch-like submission, where you can get back a lot of code, some
program outputs, and some error messages, all in a big lump. I want tl look
through that lump to locate all the error or warning messages
Also, look at ocw.mit.edu for free course notes with statistical content.
On 9/8/11, kensuguro wrote:
> I understand this isn't a r specific question. I'm switching departments to
> work with the analytics team at my company as a "service" side manager to
> better incorporate the analytics proce
My approach has been autodidactic. There's a bookstore near me (Barnes
and Noble at U of Penn) that has a terrific stats section. Amazon also
has a lot of books, including limited online browsing + reader
recommendations.
On 9/8/11, kensuguro wrote:
> I understand this isn't a r specific question
I understand this isn't a r specific question. I'm switching departments to
work with the analytics team at my company as a "service" side manager to
better incorporate the analytics process into product design / production.
We're an online gaming company.
As I'm going through tools like R, rapi
Hi,
I wonder if someone can help me. I have built a gam model to predict the
presence of cold water corals and am now trying to evaluate my model by
splitting my dataset into training/test datasets.
In an ideal world I would use the sample() function to randomly select rows of
data for me so fo
Is your "data" supposed to be observations, or values of the density
of the underlying law?
Also, could you explain the rationale behind :
sum(a$y)*(a$x[1]-a$y[2])
because it is not immediately clear to the reader.
2011/9/8 Gonçalo Ferraz :
> Hi, I have a vector 'data' of 58 probability values (b
Mohan L wrote on 09/08/2011 12:35:18 PM:
>
> Hi All,
>
> I have txt file like :
>
> $ cat data.txt
> US 10
> UK 12
> Ind 4
> Germany 14
> France 8
>
> > rawdata <- read.table(file='data.txt',sep='\t' , header=FALSE)
>
> > rawdata
>V1 V2
> 1 US 10
> 2 UK 12
> 3 I
Hi All,
I have txt file like :
$ cat data.txt
US 10
UK 12
Ind 4
Germany 14
France 8
> rawdata <- read.table(file='data.txt',sep='\t' , header=FALSE)
> rawdata
V1 V2
1 US 10
2 UK 12
3 Ind 4
4 Germany 14
5 France 8
I want to draw pie chart for the above dat
I've seen a number of issues with the loading of workspaces discussed
previously, but here's another one... I simply can't load any saved workspace
at all... Here's an example, starting with an empty workspace and creating a
single variable "a".
> a<-1:5
> save.image("a.Rdata")
> rm(a)
> load
I want to plot a multiline annotation including a mathematical expression using
grid graphics (grid.text).
This works fine for a single line, but the math expression is misplaced when I
insert a line break ("\n" escape sequence):
grid.text(expression(paste("Some words here\n more ", sigma)))
Do
On Mon, Sep 5, 2011 at 12:25 AM, Yvonnick Noel wrote:
> Hi Bill,
>
> I once modelled a hysteresis phenomenon (on binary data) with a simple
> logistic model. I am not sure I understand how this pattern appears in your
> data, but in my previous analyses, it appeared as an order effect: The
> resp
Look at
area <- sum(a$y)*(a$x[1]-a$y[2])
The problem appears to be "a$x[1]-a$y[2]"; that is not the length of
the base of an approximating rectangle, whatever it is :-)
albyn
On Thu, Sep 08, 2011 at 11:36:23AM -0400, Gonçalo Ferraz wrote:
> Hi, I have a vector 'data' of 58 probability value
For bounded density estimation look at the logspline package instead of the
regular density 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-hel
On 08/09/2011 11:14 AM, Mike Miller wrote:
On Thu, 8 Sep 2011, Duncan Murdoch wrote:
> On 11-09-07 6:25 PM, Mike Miller wrote:
>
>> I'm getting the impression from on-line docs that R cannot work with
>> single-precision floating-point numbers, but that it has a pseudo-mode
>> for single pre
Hi,
You can get something better in this way:
plot(mtree,terminal_panel=node_barplot(mtree, ylines=1.2, gap=0.05))
Check node_barplot() for details, although it does not offer for barplots
the possibility to graph it horizontally.
Regards,
Carlos Ortega
www.qualityexcellence.es
On Thu, Sep 8,
Hi,
I think this other post could help:
http://stackoverflow.com/questions/7328104/optim-with-inequality-constraint
Regards,
Carlos Ortega
www.qualityexcellence.es
On Thu, Sep 8, 2011 at 3:54 PM, Liu Evans, Gareth <
gareth.liu-ev...@liverpool.ac.uk> wrote:
> Dear All,
>
> I would like to minimi
Hi,
Thanks for the reply. For the combined plot, if I use:
ggplot(comb2) + geom_freqpoly(aes(x = value,
y = ..density.., group = X2))
I get the same colour for both the sets of distributions. What I want is one
colour for the first set of distributions, and a different c
Hi,
Use packages "rpart.plot" or "maptree" to enhance the tree drawing.
Or another alternative, use "party" package that offers much more graphing
possibilities.
Regards,
Carlos Ortega
www.qualityexcellence.es
On Thu, Sep 8, 2011 at 5:27 PM, Brian Jensvold wrote:
> I am trying to create a cla
On Thu, 8 Sep 2011, William Dunlap wrote:
Use gzcon() to make a compressed connection and any function that write
to a connection will write compressed data. E.g.,
> con <- gzcon(file("tempfile.junk", "wb"))
> x <- as.integer(rep(c(-127, 1, 127), c(3,2,1)))
> writeBin(x, con, size=1)
> cl
Hi,
If you read carefully the help pages for read.table you get this:
na.stringsa character vector of strings which are to be interpreted as
NA<../../utils/help/NA> values.
Blank fields are also considered to be missing values in logical, integer,
numeric and complex fields.
So, both NAs and bl
In my.ls() you ought to convert the pos argument
to an environment and consistently use that environment
in the calls to eval, get, and ls in the function.
E.g., with the following modification
my.ls1 <- function (pos = 1, sorted = FALSE, envir = as.environment(pos))
{
.result <- sapply(ls(env
Use gzcon() to make a compressed connection and any
function that write to a connection will write compressed
data. E.g.,
> con <- gzcon(file("tempfile.junk", "wb"))
> x <- as.integer(rep(c(-127, 1, 127), c(3,2,1)))
> writeBin(x, con, size=1)
> close(con)
> q("no")
bill:158% zcat temp
I am trying to create a classification tree using either tree or rpart
functions but when it comes to plotting the results the formatting I get is
different than what I see in all the tutorials (like
http://www.youtube.com/watch?v=9XNhqO1bu0A or
http://www.youtube.com/watch?v=m3mLNpeke0I&feature=re
Hi, I have a vector 'data' of 58 probability values (bounded between 0 and 1)
and want to draw a probability density function of these values. For this, I
used the commands:
data <- runif(58)
a <- density(data, from=0, to=1)
plot(a, type="l",lwd=3)
But then, when I try to approximate the area
Hello Andrew,
Take a look at the following:
predict(model1, addx=T)
predict(model2, addx=T)
predict(model3, addx=T)
As you can see, the factor was turned into dummy variables. However, the
predict.rma() function does not expand a factor passed via newmods into the
corresponding dummy variables
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of jim holtman
> Sent: Thursday, September 08, 2011 6:52 AM
> To: Bos, Roger
> Cc: r-help@r-project.org
> Subject: Re: [R] Variable scoping question
>
> Here is a function I use to
Hi Brian
On Thu, Sep 8, 2011 at 10:30 AM, Brian Smith wrote:
> Hi,
>
> I was trying to overlay/combine two freqpoly plots. The sample code below
> illustrates the problem. Essentially, I want to do is:
>
> 1. Have the same colour for all the lines in 'Plot 1' (and 'Plot 2').
Then don't map the c
Hi,
I was trying to overlay/combine two freqpoly plots. The sample code below
illustrates the problem. Essentially, I want to do is:
1. Have the same colour for all the lines in 'Plot 1' (and 'Plot 2').
Currently, all the lines in Plot 1 have different colours and all the
lines in Plot 2 have
I set maxnodes and nodesize to reasonable levels and everything is
working great now. Thanks for the guidance.
v/r,
John
On Thu, Sep 8, 2011 at 8:58 AM, Liaw, Andy wrote:
> It looks like you are building a regression model. With such a large number
> of rows, you should try to limit the size o
On Thu, 8 Sep 2011, Duncan Murdoch wrote:
On 11-09-07 6:25 PM, Mike Miller wrote:
I'm getting the impression from on-line docs that R cannot work with
single-precision floating-point numbers, but that it has a pseudo-mode
for single precision for communication with external programs.
I don'
Hello everyone
I have a couple of questions about the usage of the R function
"read.table(.)". My point of departure is that I want to import a matrix
(consisting of time and daily stock returns of many stocks) in R. Most of
the data is numeric, however some values are missing (blanks) and in o
Hi,
I am trying to get the terminal nodes of a plot of a ctree object to look nice.
Using the iris data I have:
library(party)
mtree <- ctree(Species ~ ., data=iris)
plot(mtree,terminal_panel=node_barplot(mtree))
The terminal nodes don't display the species names because the names
are displayed
have a look at ?formula and the examples
2011/9/8 Bos, Roger :
> I have a matrix called mat and y is the column number of my response and
> x is a vector of the column numbers of my terms. The variable name of y
> can change, so I don't want to hardcode it. I can find out the name as
> follows:
Dear All,
I would like to minimise a nonlinear function subject to linear inequality
constraints as part of an R program. I have been using the constrOptim
function. I have tried all of the methods that come with Optim, but nothing
finds the correct solution. If I use the correct solution as
Hi,
I was trying to overlay/combine two freqpoly plots. The sample code below
illustrates the problem. Essentially, I want to do is:
1. Have the same colour for all the lines in 'Plot 1' (and 'Plot 2').
Currently, all the lines in Plot 1 have different colours and all the lines
in Plot 2 have dif
Hi Kristian,
The idea behind projection is that you take an iterate that violates the
constraints and project it onto a point such that it is the nearest point that
satisfies the constraints.
Suppose you have an iterate (w1, w4) that does not satisfy the constraint that
w1 * w4 != (1 + eps)/2.
-- begin included message --
I am trying to create a classification tree using either tree or rpart
but when it comes to plotting the results the formatting I get is
different than what I see in all the tutorials. What I would like to
see is the XX/XX format but all I get is a weird decimal value.
francogrex wrote on 09/08/2011 08:08:19 AM:
>
> Hi, anyone has experience with 3D plot (ex: in package RGL) I have a
> question, I draw a 3D plot of country, year and sales in z axis but when
the
> type is "h" then it's ok but when I want to link the points and type is
'l'
> lines it's a mess Is
Here is a function I use to look at the sizes of objects:
my.ls <-
function (pos = 1, sorted = FALSE)
{
.result <- sapply(ls(pos = pos, all.names = TRUE), function(..x)
object.size(eval(as.symbol(..x
if (sorted) {
.result <- rev(sort(.result))
}
.ls <- as.data.frame(rbi
Em 8/9/2011 05:24, Viechtbauer Wolfgang (STAT) escreveu:
I assume you mean Cohen's kappa. This is not what the OP is asking
about. The OP wants to know how to test for a difference in the
proportions of 1's. Cohen's kappa will tell you what the level of
agreement is between the two tests. This is
On Sep 8, 2011, at 9:13 AM, Bos, Roger wrote:
I modified an example in the object.size help page to create a
function
I want to be able to run:
"mysize" <- function() {
z <- sapply(ls(), function(w) object.size(get(w)))
as.matrix(rev(sort(z))[1:5])
}
mysize()
When I test the lines ins
The answer to my question was :
fmla <- as.formula(names(mat)[y] %+% " ~ .")
mod <- try(rlm(fmla, data=mat[zidx, c(y, x)]), silent=TRUE)
Thanks for your help and the quick response.
Roger
-Original Message-
From: Jean-Christophe BOUËTTÉ [mailto:jcboue...@gmail.com]
Sent: Thursday, Sep
On Sep 8, 2011, at 9:03 AM, Bos, Roger wrote:
I have a matrix called mat and y is the column number of my response
and
x is a vector of the column numbers of my terms. The variable name
of y
can change, so I don't want to hardcode it. I can find out the name
as
follows:
name
Hi
>
> Hello,
>
> I am using cbind in a lm-model. For standard lm-models
> the r.squared can be easily extracted with summary(model)$r.squared,
> but that is not working in in the case with cbind.
>
> Here an example to illustrate the problem:
> a <- c(1,3,5,2,5,3,1,6,7,2,3,2,6)
> b <- c(12,15,
I modified an example in the object.size help page to create a function
I want to be able to run:
"mysize" <- function() {
z <- sapply(ls(), function(w) object.size(get(w)))
as.matrix(rev(sort(z))[1:5])
}
mysize()
When I test the lines inside the function it works fine:
> z <- sapply
On Sep 8, 2011, at 14:53 , Johannes Radinger wrote:
> Hello,
>
> I am using cbind in a lm-model. For standard lm-models
> the r.squared can be easily extracted with summary(model)$r.squared,
> but that is not working in in the case with cbind.
>
> Here an example to illustrate the problem:
> a
Hi, anyone has experience with 3D plot (ex: in package RGL) I have a
question, I draw a 3D plot of country, year and sales in z axis but when the
type is "h" then it's ok but when I want to link the points and type is 'l'
lines it's a mess Is there a way to link the points only in one direction?
Fo
I have a matrix called mat and y is the column number of my response and
x is a vector of the column numbers of my terms. The variable name of y
can change, so I don't want to hardcode it. I can find out the name as
follows:
>names(mat)[y]
[1] "er12.l"
Then I can run the regression
1 - 100 of 127 matches
Mail list logo