Hello everyone,
I am trying to color two boxplots on the same graph two
different colors.
I have tried the following
boxplot(5,1:19,5,20:39,col=c(red,blue))
but all I get are two blue boxes.
Any help would be appreciated
Paul
[[alternative HTML version deleted]]
Hello,
aa-c(1,1,2,2,3,3,4,4,5,5,6,6)
bb-c(56,56,33,33,53,53,20,20,63,63,9,9)
cc-data.frame(aa,bb)
uniquedf - unique(cc)
View(uniquedf)
Why does the column row.names appear in the new dataframe and how do I get
rid of it.
uniquedf$row.names - NULL does not seem to work.
For what I'm doing
Dear R-users,
is there some way how to pass various colnames to the following code for
sorting data.frames?
mydf.ordered-with(mydf, mydf[order(colname1,colname2, colnameX, decreasing
= TRUE), ])
I was trying something like
Afunction-function (mydf,colnames,decreasing=T){
Thanks. ave() is the exact function I was after.
tonyxv wrote:
Hello,
I have a dataframe
ID1 ID2
A1B3
A1B4
A1B3
A1B3
A2B1
A2B1
A2B4
A3B2
A3B2
A5B1
A5B1
A5B6
A5B4
A6B2
I want to add extra columns to the
- There is no column in the data frame called row.names. It only
looks that way when you use the viewer.
- All data frames must have row and column names. This is not
negotiable. Also, the row.names will not interfere with any merging
operation because they are not a column of the data frame:
You are drawing four box plots, not two. Two of them are just the number 5.
The two box plots that are only 5 don't have a box, so you can't see that
they're red. Try this:
boxplot(1:19,20:39,col=c(red,blue))
Paul Adams-8 wrote:
Hello everyone,
I am trying to color two boxplots on the
Your request is too vague for us to be very helpful. However OpenBUGS
runs without very frequent crashes only on some ix86 Linux machines -- and
what those are is unclear and Uwe Ligges and I (working on BRugs) have
been unable to find one recently.
There are dozens of Bayesian MCMC packages
Hi,
I use RSPerl on Ubuntu and Apache2 web server. It is my first experience
with R language :-)
I have the next code embedded into a Perl CGI:
use R;
use RReferences;
my @x;
R::initR(--silent,--no-save);
R::library(RSPerl);
@x = R::call(rnorm, 10);
R::call(plot, [EMAIL PROTECTED]);
The CGI
Hi all,
As I was uploading a couple of little fixes to prettyR, I remembered
that there was a question I wanted to ask. I remember the package list
being updated whenever I installed a new package (at least on Linux, oh
yes, Fedora Core 9 now), but not on Windows (I just used to unzip the
packages
Hi,
I am using RSPerl package on Ubuntu and Apache2 web server. It is my first
experience with R language :-)
I have the next code embedded into a Perl CGI:
use R;
use RReferences;
my @x;
R::initR(--silent,--no-save);
R::library(RSPerl);
@x = R::call(rnorm, 10);
R::call(plot, [EMAIL
See orderBy in the doBy package.
On Sat, Jun 21, 2008 at 7:58 PM, Jiří Voller [EMAIL PROTECTED] wrote:
Dear R-users,
is there some way how to pass various colnames to the following code for
sorting data.frames?
mydf.ordered-with(mydf, mydf[order(colname1,colname2, colnameX, decreasing
=
See
https://bugzilla.redhat.com/show_bug.cgi?id=442727
Right now I seem to be using
/usr/share/doc/R-2.7.0/html
to get the list (on finzi.psych.upenn.edu)
On 06/22/08 20:43, Jim Lemon wrote:
Hi all,
As I was uploading a couple of little fixes to prettyR, I remembered
that there was a
Below is a revised set of code that demonstrates my question a little more
clearly, I hope.
When plotting all the data (5th panel), col sym don't seem to be passed
correctly, as the (random) first value for col sym are used for all points
(run the code, then run it again, you'll see how the 5th
Josep Lluís Figueras wrote:
Hi,
I am using RSPerl package on Ubuntu and Apache2 web server. It is my first
experience with R language :-)
I have the next code embedded into a Perl CGI:
use R;
use RReferences;
my @x;
R::initR(--silent,--no-save);
R::library(RSPerl);
@x = R::call(rnorm, 10);
Hi there,
try to open a graphic device with x11(), may be.
cheers,
miltinho
On 6/22/08, Josep Lluís Figueras [EMAIL PROTECTED] wrote:
Hi,
I am using RSPerl package on Ubuntu and Apache2 web server. It is my first
experience with R language :-)
I have the next code embedded into a Perl
Maybe this help you
http://www.rforge.net/Cairo/index.html
http://www.rosuda.org/R/GDD/
daniel cegielka
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of milton ruser
Sent: Sunday, June 22, 2008 5:56 PM
To: Josep Lluís Figueras
Cc: r-help@r-project.org
Try this:
library(lattice)
all$resp - as.factor(all$resp)
stripplot(~ index | resp * yr, all, col = all$col, pch = all$sym,
layout = c(1, 4))
On Sun, Jun 22, 2008 at 10:43 AM, Bryan Hanson [EMAIL PROTECTED] wrote:
Below is a revised set of code that demonstrates my question a little more
I've done some looking around in R and elsewhere to answer my question
on the value of R vs. Bugs for MCMC. So, for anyone who is curious,
here's what I think I've found: Bugs compiles its code, which should
make it much faster than a pure R program. Packages such as AMCMC run
MCMC in R,
Thanks Gabor, I'm getting closer.
Is there a way to spread out resp values vertically for a given value of
index? In base graphics, stripchart does this with method = stack. But
in lattice, stack = TRUE does something rather different, and I don't see a
combination of lattice arguments that
Hi,
I have the following problem:
I want to redefine the for loop (or define a similar statement) to change its
behavior under some circumstances. So, I would like sthg. like
For = function ( var, vec, statement ) {
if ( ... ) {
/* my implementation of for */
}
else {
/* call
Hi there
My script at each iteration produces a .dat file which I save in a directory
with write.table. Then I need to read each line of this file and create a
directory for each line and put elements of that row in that directory. I do it
with the following script which I have inserted
I tried it with a simple example to make it easier to check the
result and it does seem we need a panel function, pnl:
library(lattice)
DF - data.frame(x = 1:5, col = c(1:4, 1), g = c(1, 1, 2, 2, 2), pch =
c(1:3, 2:1))
pnl - function(x, y, subscripts, col, pch, ...) panel.stripplot(x, y,
col =
# I've tried to make this easy to paste into R, though it's probably
so simple you won't need to.
# I have some data (there are many more variables, but this is a
reasonable approximation of it)
# here's a fabricated data frame that is similar in form to mine:
my.df - data.frame(replicate(10,
This does away with the 'for' loops and uses 'expand.grid' to create
the combinations. I think I got the right variables substituted:
my.df - data.frame(replicate(10, round(rnorm(100, mean=3.5, sd=1
var.list - c(dv1, dv2, dv3, iv1, iv2, iv3, iv4, iv5,
intv1, intv2)
names(my.df) - var.list
#
What is the value of 'line' on the first iteration? It appears to be
undefined. You probably want something like this:
while (TRUE){
line - readLines(con, n=1)
if (length(line) == 0) break
.your normal statements.
}
On Sun, Jun 22, 2008 at 3:29 PM, Yasin Hajizadeh
[EMAIL
Wow -- many thanks for the mind-*expanding* help! I'm really impressed by
R's ability to handle this so concisely It's going to take me a while to
get used to applying things to vectors, but the more I understand, the nicer
R looks.
On Sun, Jun 22, 2008 at 6:59 PM, jim holtman [EMAIL
Hi all:
I have been using ggplot2 graphics for quite some time now and I really like
it. However, I haven't used barplots enough to understand the arquitecture
behind it. Can someone show me how to make this simple barplot graph with
ggplot2? I want PondName along the x axis and avgWt along
Hey, good topic for a thread. I've wrestled with this over the years.
I think there's some user confusion about what WinBUGS does. People
who did not see BUGS before WinBUGS tend not to understand this in the
same way...
The unique / important contributions from WinBUGS are the collection
of
Hi,
Is there any package that I can use to simulate the Gaussian
Mixture Model , which is a mixture modeling method that is widely used
in statistical learning theory.
I know there is a mclust, however, I think it is a little bit
different from my problem.
Thanks very much..
Dear R users:
I just got confused some R code used in linear mixed model~
example,two factors,A, B,C,A is fixed ,B,C are random,and B is nested in
C,if I wannt to use linear mixed model,are the following code correct for
each case?
case1:want to know random effect of B,
Take a look at mixtools.
Tatiana
On Jun 22, 2008, at 9:23 PM, Peng Jiang wrote:
Hi,
Is there any package that I can use to simulate the Gaussian
Mixture Model , which is a mixture modeling method that is widely
used in statistical learning theory.
I know there is a mclust, however, I
Hi, Peng,
I had a piece of SAS code for 2-class gaussian mixture from my blog.
You might convert it to R code.
2-Class Gaussian Mixture Model in SAS
data d1;
do i = 1 to 100;
x = ranuni(1);
e = rannor(1);
y = 5 * x + e;
output;
end;
run;
data d2;
do i = 1 to 100;
x =
Hi,
How can I extract the label only from a given data frame.
Fore example from this data frame.
print(dataf)
V1 V2 V3 V4 V5 V6 V7 V8 V9
1114514.317.131.241.745.849.868.670.672.9
3545 10.215.620.9
Wait. The first column is really the rowname. So you want this:
row.names(x)
[1] 11145 3545 8951 11097
On Sun, Jun 22, 2008 at 10:16 PM, Gundala Viswanath [EMAIL PROTECTED] wrote:
Hi,
How can I extract the label only from a given data frame.
Fore example from this data frame.
Hi,
random=~1|B/C
C is nested in B
##Example
data=Oats
regress=lme(yield~nitro*Variety,data=Oats,random=~1|Block/Variety)
##i.e. variety is nested in block
summary(regress)
##End of example
Best,
Daniel
-
cuncta stricte discussurus
-
Hi folks,
Can anyone suggest an efficient way to do matching without
replacement, or one-to-one matching? pmatch() doesn't quite provide
what I need...
For example,
lookupTable - c(a,b,c,d,e,f)
matchSample - c(a,a,b,d)
##Normal match() behaviour:
match(matchSample,lookupTable)
[1] 1 1 2 4
Hi:
Thank you very much,and for your case
if I wirte as
regress=lme(yield~nitro*Variety,data=Oats,random=~Variety|Block)
what this mean?
Regards
2008/6/22 Daniel Malter [EMAIL PROTECTED]:
Hi,
random=~1|B/C
C is nested in B
##Example
data=Oats
Hi,
Given this data frame:
print(repo.dat)
V1 V2 V3 V4
V5 (can be more)
1 1007_s_at DDR1 2865.1 2901.3 1978.3 300.2
2 1053_at RFC2 103.681.6 108.0 101.3
I want to split them into two data
First, simulate a uniform r.v on [0,1] and then cast it to binary label
according to your underlying mixing probability;
Second, simulate a Gaussian r.v. in above selected component.
Of course, you can vecterize the two steps to simply your code.
X
Peng Jiang 写道:
Hi,
Is there any package
Try this. apseq() sorts the input and appends a
sequence number: 0, 1, ... to successive
occurrences of each value. Apply that to both
vectors transforms it into a problem that works
with ordinary match:
lookupTable - c(a, a,b,c,d,e,f)
matchSample - c(a, a,a,b,d)
# sort and append sequence
How about
x - lookupTable
x[!(x %in% matchSample)] - NA
pmatch(matchSample,x)
Regards,
Moshe.
--- On Mon, 23/6/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Subject: [R] One-to-one matching?
To: r-help@r-project.org
Received: Monday, 23 June,
Or use make.unique() in place of apseq()
On Sun, 22 Jun 2008, Gabor Grothendieck wrote:
Try this. apseq() sorts the input and appends a
sequence number: 0, 1, ... to successive
occurrences of each value. Apply that to both
vectors transforms it into a problem that works
with ordinary
You could do something like:
k - dim(repo.dat)[2]
odd - seq(from=1,to=k,by=2)
even - seq(from=2,to=k,by=2)
even-c(1,even)
df1 - repo.dat[,odd)
colnames(df1) - paste(V,odd,sep=)
df2 - repo.dat[,even)
colnames(df2) - paste(V,even,sep=)
--- On Mon, 23/6/08, Gundala Viswanath [EMAIL PROTECTED]
See
?split
help.search() is (or should be) your friend.
HTH,
Chuck
On Mon, 23 Jun 2008, Gundala Viswanath wrote:
Hi,
Given this data frame:
print(repo.dat)
V1 V2 V3 V4
V5 (can be more)
1 1007_s_at DDR1
44 matches
Mail list logo