Hello,
I have a problem with categorical variables and dummy encoding. I've a
factor and
for each pair (i,j) with i != j, I'd like to fit
res ~ a*x[i] - b*x[j]. A brief example with 3 variables:
a - b = 2
b - c = -1
c - a = 0
Thus I fitted the following model:
fit <- lm(result ~ X + Y)
whe
If I have data that I feed into shapio.test and jarque.bera.test yet they seem
to disagree. What do I use for a decision?
For my data set I have p.value of 0.05496421 returned from the shapiro.test and
0.882027 returned from the jarque.bera.test. I have included the data set below.
Thank you.
I searched the forms (i.e., R Search) and come up with the following suggested
link:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f
I tried to implement what I believe was being implied by that URL and came up
with the below:
barplot(WorldPhones[1,],
If I have data that I feed into shapio.test and jarque.bera.test yet they seem
to disagree. What do I use for a decision?
For my data set I have p.value of 0.05496421 returned from the shapiro.test and
0.882027 returned from the jarque.bera.test. I have included the data set below.
Thank you.
Hi,
I would like to draw a box at each corner of lower 10% and upper 10% in the
scatter plot on(0,1)*(0,1) to indicate the lower and upper tail. I hope
somebody can help me.
Here is my code:
## scatter plot
plot(hume_uni[,2],beec_uni[,2], pch=19, xlab="Hume_uni", ylab="Beec_uni", col=
"bl
Tena koe Jason
Is this an example of what you want?
temp <- barplot(3:17)
text(temp, rep(-0.5, length(3:17)), LETTERS[3:17], srt=45, adj=1)
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Jason Rupe
Dear R-helpers,
I am very new to R and trying to run the conditional logit model using
"clogit " command.
I have more than 4000 observations in my dataset and try to predict the
dependent variable from 14 independent variables. My command is as follows
clmtest1 <-
clogit(Pin~Income+Bus+Pop+U
Hi
I am trying to do a simple XY plot with a dataset that has dates stored as
integers . I would like to have the X values displayed as dates. I realize I
could do this by converting the x values to dates first, However, does R have
the ability like SAS FORMAT, for example, of reformatting the
Hi Corrado,
I was thinking about this some more.
Maybe you could use a linear discriminate, i.e. a (hyper)plane that
partitions your points into two sets, such that the misclassification
rate is minimised.
Closeness could be regarded as the number of misclassified points.
Two sets would be dista
I want to have a collection object that can store objects. In R I only saw
lists. But these only seem to be able to handle basic objects like numbers and
strings. Whenever I tried to add more complicated objects or just very simple
data structures like matrices I would get an error like:
"n
I am trying to calculate a partial correlation and p-values. Unfortunately,
the results in R are different than what SPSS gives.
Here is an example in R (calculating the partial correlation of x and y,
controlling for z1 and z2):
x <- c(1,20,14,30,9,4,8)
y <- c(5,6,7,9,NA,10,6)
z1 <- c(13,8,16,
Amir Liu wrote:
>
> I want to have a collection object that can store objects. In R I only saw
> lists. But these only seem to be able to handle basic objects like numbers
> and strings. Whenever I tried to add more complicated objects or just very
> simple data structures like matrices I would
Tena koe M Haywood
I haven't a clue about SAS FORMAT, but R does have the ability to
specify the axis ticks, labels and titles in pretty much any way you
might require. See ?axis and also ?text
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto
Hello,
I've been using various packages in R for a few years now to analyse
genomics data but I've just come up with some errors for which I canÂt seem to
find a solution. HereÂs the situation:
> source("http://harlequin.jax.org/rmodel/packages/downloadRmodel.R";)
> getRmodelHuman()
also
On Tue, Dec 1, 2009 at 1:40 AM, Karl Ove Hufthammer wrote:
> On Tue, 1 Dec 2009 14:48:04 +1100 Remko Duursma
> wrote:
>> any(duplicated(c(1,2,2)))
>
> or
> anyDuplicated(c(1,2,2))
> which is slightly more efficient.
I don't find anyDuplicated(). Which package is it from?
___
Tena koe Roslina
Check:
?rect
?quantile
Perhaps those two functions will give you what you want.
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Roslina Zakaria
> Sent: Wednesday, 2 December 2009 12
Hi there,
Could you provide a minimum reproducible code, please.
Bests
milton
On Tue, Dec 1, 2009 at 6:11 PM, wrote:
> If I have data that I feed into shapio.test and jarque.bera.test yet they
> seem to disagree. What do I use for a decision?
>
> For my data set I have p.value of 0.05496421 re
Try this:
R> apropos('any')
R> ?anyDuplicated
HTH,
Jorge
On Tue, Dec 1, 2009 at 8:32 PM, Peng Yu wrote:
> On Tue, Dec 1, 2009 at 1:40 AM, Karl Ove Hufthammer
> wrote:
> > On Tue, 1 Dec 2009 14:48:04 +1100 Remko Duursma
> > wrote:
> >> any(duplicated(c(1,2,2)))
> >
> > or
> > anyDuplicated(c
Hi,
I try to use the numerical integration functionality of R to integrate a
univariate (1D) function. Below I am integrating function const1 which works
nicely as expected. But for some reasons I need to pass to my function that I
want to integrate an additional parameter. If it were object-
Matthew Anaka wrote:
Hello,
I've been using various packages in R for a few years now to analyse
genomics data but I've just come up with some errors for which I canÂ’t seem to
find a solution. HereÂ’s the situation:
source("http://harlequin.jax.org/rmodel/packages/downloadRmodel.R";)
Here is an example of how I attempt to add elements to a given list denoted as
l:
> l <- list()
> l
list()
> l[1] <- 5
> l
[[1]]
[1] 5
> l[2] <- "cd"
> l
[[1]]
[1] 5
[[2]]
[1] "cd"
> l[3] <- matrix(1:4,2,2)
Warning message:
In l[3] <- matrix(1:4, 2, 2) :
number of items to replace is not
On Tue, Dec 1, 2009 at 7:46 PM, Jorge Ivan Velez
wrote:
> Try this:
> R> apropos('any')
> R> ?anyDuplicated
> HTH,
> Jorge
>
> On Tue, Dec 1, 2009 at 8:32 PM, Peng Yu wrote:
>>
>> On Tue, Dec 1, 2009 at 1:40 AM, Karl Ove Hufthammer
>> wrote:
>> > On Tue, 1 Dec 2009 14:48:04 +1100 Remko Duursma
I guess it depends on which version of R you are using. My sessionInfo()
follows. What's yours?
R> sessionInfo()
R version 2.10.0 Patched (2009-10-26 r50212)
i386-pc-mingw32
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United State
Amir Liu wrote:
>
> In l[3] <- matrix(1:4, 2, 2) :
> number of items to replace is not a multiple of replacement length
>
When inserting single entries into a list list, you should use the '[[ ]]'
notation. Use '[ ]' when you want to extract multiple entries or copy
multiple entries from on
On Tue, Dec 1, 2009 at 8:04 PM, Jorge Ivan Velez
wrote:
>
> I guess it depends on which version of R you are using. My sessionInfo()
> follows. What's yours?
> R> sessionInfo()
> R version 2.10.0 Patched (2009-10-26 r50212)
> i386-pc-mingw32
> locale:
> [1] LC_COLLATE=English_United States.1252 L
On 2/12/2009, at 3:08 PM, Sharpie wrote:
Amir Liu wrote:
In l[3] <- matrix(1:4, 2, 2) :
number of items to replace is not a multiple of replacement length
When inserting single entries into a list list, you should use the
'[[ ]]'
notation. Use '[ ]' when you want to extract multipl
On 2/12/2009, at 3:09 PM, Peng Yu wrote:
Here is my sessionInfo().
[Snotty comment deleted.]
sessionInfo()
R version 2.7.1 (2008-06-23)
If you're going to use a version which is that antiquated
then you can expect a great many things not to wor
Dear R users, and Dr. Delagard
I got an R-announce message which tells that
R-2.10.0 will be released on December 4, 2009.
Houever, it seems the R of that version was already
released. At leased I made sure that the R of that version
was in Cran and Univ. of Tsukuba, and also Univ. of Toronto.
On Tue, Dec 1, 2009 at 8:24 PM, Rolf Turner wrote:
>
> On 2/12/2009, at 3:09 PM, Peng Yu wrote:
>
>
>
>> Here is my sessionInfo().
>
> [Snotty comment deleted.]
>
>>> sessionInfo()
>>
>> R version 2.7.1 (2008-06-23)
>
>
>
> If you're going to use a version which is th
Hi,
When I reply to a post, it generally appears as a separate thread,
rather than branching off the original post.
Anyone know what I'm doing wrong?
Noting I am currently receiving a couple of the lists in digest form.
kind regards
--
Charlotte Maia
http://sites.google.com/site/maiagx/home
On Tue, Dec 1, 2009 at 6:19 PM, Hiroto Miyoshi
wrote:
>
> Dear R users, and Dr. Delagard
>
> I got an R-announce message which tells that
> R-2.10.0 will be released on December 4, 2009.
According to the message I received it was the first patch release,
2.10.1, that was announced not 2.10.0.
-C
Hi, R-2.10.0 was released and R-2.10.1 is to be released soon. I don't
think there is any problem with cran.
Best
2009/12/2 Hiroto Miyoshi :
>
> Dear R users, and Dr. Delagard
>
> I got an R-announce message which tells that
> R-2.10.0 will be released on December 4, 2009.
>
> Houever, it seems t
I don't know what you are doing wrong because I don't know exactly what you are
doing. I do know that I don't have your problem when I simply reply to a
message without touching the subject line.
John
-Original Message-
From: Charlotte Maia
To:
Sent: 12/1/2009 9:48:06 PM
Subject: [R]
On 2/12/2009, at 3:48 PM, Peng Yu wrote:
On Tue, Dec 1, 2009 at 8:24 PM, Rolf Turner
wrote:
On 2/12/2009, at 3:09 PM, Peng Yu wrote:
Here is my sessionInfo().
[Snotty comment deleted.]
sessionInfo()
R version 2.7.1 (2008-06-23)
If you're going to us
Hi,
I have a a vector and a data frame with two columns
vec = c("C", "A", "B")
dataDF = data.frame(A1 = c("B", "A", "C"), A2 = c(1,2,3))
I would like to sort the data frame by column A1 such that the order of
elements in A1 is as the same as in vec.
After the ordering, the data frame
On 12/2/09, John Sorkin wrote:
> I don't know what you are doing wrong because I don't know exactly what you
> are doing. I do know that I don't have your problem when I simply reply to a
> message without touching the subject line.
> John
Could you clarify the notion of "simply reply".
There i
milton ruser gmail.com> writes:
>
> Hi there,
>
> Could you provide a minimum reproducible code, please.
> Bests
>
> milton
>
> On Tue, Dec 1, 2009 at 6:11 PM, charter.net> wrote:
>
> > If I have data that I feed into shapio.test and jarque.bera.test yet they
> > seem to disagree. What do I
Is this what you want:
> dataDF = data.frame(A1 = c("B", "A", "C"), A2 = c(1,2,3))
> dataDF
A1 A2
1 B 1
2 A 2
3 C 3
> dataDF[order(dataDF$A1),]
A1 A2
2 A 2
1 B 1
3 C 3
>
If you want the sequence "CAB" then you will have to change the
factors in column 1:
> dataDF$A1 <- factor(dat
not ellegant.. but...
vecDF = data.frame(A1=c("C", "A", "B"))
vecDF$A1.order=1:dim(vecDF)
vecDF
dataDF = data.frame(A1 = c("B", "A", "C"), A2 = c(1,2,3))
dataDF2<-merge(vecDF, dataDF,
by=intersect(colnames(vecDF),colnames(dataDF)))
dataDF2
dataDF2.ord<-dataDF2[order(dataDF2$A1.order),]
dataDF2.ord
I always see a banner like the following, which is annoying. I'm
wondering how to disable it.
R version 2.7.1 (2008-06-23)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it
The factor statement should have been: (missed the 'vec' on the first reading)
dataDF$A1 <- factor(dataDF$A1, levels=vec)
On Tue, Dec 1, 2009 at 10:57 PM, jim holtman wrote:
> Is this what you want:
>
>> dataDF = data.frame(A1 = c("B", "A", "C"), A2 = c(1,2,3))
>> dataDF
> A1 A2
> 1 B 1
> 2
On Dec 1, 2009, at 10:42 PM, Charlotte Maia wrote:
On 12/2/09, John Sorkin wrote:
I don't know what you are doing wrong because I don't know exactly
what you are doing. I do know that I don't have your problem when I
simply reply to a message without touching the subject line.
John
Coul
On Dec 1, 2009, at 10:59 PM, jim holtman wrote:
The factor statement should have been: (missed the 'vec' on the
first reading)
dataDF$A1 <- factor(dataDF$A1, levels=vec)
It's not necessary to alter the data.frame. You can use the results of
the construction above as the row index and st
Peng Yu gmail.com> writes:
> I always see a banner like the following, which is annoying. I'm
> wondering how to disable it.
R --quiet
(it took about 8 seconds to find this with R --help)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mail
Peng Yu wrote:
>
> I always see a banner like the following, which is annoying. I'm
> wondering how to disable it.
>
> R version 2.7.1 (2008-06-23)
> Copyright (C) 2008 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
Hi,
Annoying
I love it (except possibly when re-directing standard out to a file).
I think it's one of the command line options (in which case, it will
be clearly documented).
No idea how it works on the GUI systems (maybe an option somewhere...).
In saying that, I have to assume that if peo
Let consider following plot :
p <- ggplot(mtcars, aes(mpg, wt))
p + geom_point(colour="grey50", size = 4) + geom_point(aes(colour =
cyl))
Now I want R to hide the color-pallet on "cyl", placed in the right edge
completely. Can anyone please guide me how to do that?
Thanks,
--
View this me
I have the following test package.
$ ls
DESCRIPTION man NAMESPACE R
$ cat DESCRIPTION
Package: try.package
Type: Package
Title: What the package does (short line)
Version: 1.0
Date: 2009-10-26
Author: Who wrote it
Maintainer: Who to complain to
Description: More about what it does (maybe more
There was a recent discussion of the ggplot2 mailing list about a
similar issue. The first question is how will people know what the
colors mean if you remove the legend?
-Ish
On Tue, Dec 1, 2009 at 11:41 PM, Megh wrote:
>
> Let consider following plot :
>
> p <- ggplot(mtcars, aes(mpg, wt))
>
Peng Yu wrote:
>
> Then I try the package 'try.package' in an R session. I'm wondering
> why neither 'my_test_f' and 'try.package::my_test_f' work.
>
The error message you got below clearly explains this-- you did not export
my_test_f in your NAMESPACE file. To access unexported functions, y
This looks like a job for match().
vec = c("C", "A", "B")
dataDF = data.frame(A1 = c("B", "A", "C"), A2 = c(1,2,3))
dataDF[match(dataDF$A1,vec),]
A1 A2
3 C 3
2 A 2
1 B 1
-Don
At 10:36 PM -0500 12/1/09, Hao Cen wrote:
Hi,
I have a a vector and a data frame with two columns
If myscript.r has as its first line:
#! /usr/bin/Rscript
and you make it executable
chmod +x myscript.r
Then you can run it by giving the command
./myscript.r
-Don
At 3:03 PM -0800 11/30/09, chronos.phenomena wrote:
Thanks... that worked
is there a way to run r script?
for example
ychu066 wrote:
>
> my teachers doesnt understand R and I don't know how to use SAS.
> Anyone interested in translating my codes to test whether your SAS codes
> are as good as R???
> I can test it on SAS codes once you have translated it
>
>
>
> regards:working:
>
It is quite easy
Read the help page for substr().
It says that the first argument should be a character vector.
The only one that works is the one where you gave it a character vector.
You said only third one "works". But you didn't explain what you mean
by "works". It's always a good idea on r-help to show both
Thanks Ista for your mail. Here I wanted to have control on color-pallet. It
is because, here my entire plot window is subdivided in 3 sub-plots
horizontally, on basis if a factor-variable which contains three factors,
using facet_grid(). Each sub-plot contains scatter-plot. I want to color the
p
On 12/02/2009 05:07 AM, Munin wrote:
I am trying to plot data with multiple logical and physical groups using
R. Below is a sample of the kind of data I am working with and the desired
output. We have a jmp script that can do the same thing, but at ~$200 a
year the licensing is counterprodu
Thanks Don
Sent from my iPhone
On 2 Dec 2009, at 06:16, "Don MacQueen [via R]"
wrote:
> If myscript.r has as its first line:
>
>#! /usr/bin/Rscript
>
> and you make it executable
> chmod +x myscript.r
>
> Then you can run it by giving the command
>
>./myscript.r
>
>
> -Don
>
> At
Dear R-users,
I am using R version 2.9.1 and lattice 0.17-26 under windows.
In a lattice boxplot, I would like to add information on how many observations
each singel boxplot is based upon.
For example (the basic plot):
# Begin R-code
library(lattice)
dat <- data.frame(panvar = rep(c("A","B","A"
101 - 158 of 158 matches
Mail list logo