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 e
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){
mydf.ordered<-
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'
A naive question from a non-statistician: I'm looking into running a
Bayesian analysis of a model with high dimensionality. It's not a
standard model (the likelihood requires a lot of code to implement),
and I'm using a Linux machine. Was wondering if someone
has any thoughts on what the advanta
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]]
_
tonyxv wrote:
>
>
> 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.nam
on 06/21/2008 09:19 PM milton ruser wrote:
Hi there,
I have a list of filenames like
a<-c("file1.dbf", "file32.dbf", "myfile_temp.dbf")
and I would like to remove the ".dbf" string from all records and obtain
somethink like
file1
file32
myfile_temp
Thanks in advance,
miltinho
brazil
As is
Hi there,
I have a list of filenames like
a<-c("file1.dbf", "file32.dbf", "myfile_temp.dbf")
and I would like to remove the ".dbf" string from all records and obtain
somethink like
file1
file32
myfile_temp
Thanks in advance,
miltinho
brazil
[[alternative HTML version deleted]]
_
On 21/06/2008 2:48 PM, Mark Kimpel wrote:
I'd like to use rgl.surface (or some other function if more
appropriate) to create a horizontal and vertical transparent grey
slice (plane) running through both the x and y origins and extending
across the z axis, i.e. the 3-d equivalent of the normal 2-d
On Sat, 21 Jun 2008, Gavin Simpson wrote:
On Sat, 2008-06-21 at 17:56 -0400, Gabor Grothendieck wrote:
On Sat, Jun 21, 2008 at 12:40 PM, Gavin Simpson <[EMAIL PROTECTED]> wrote:
Dear List,
I have a problem I'm finding it difficult to make headway with.
Say I have 6 ordered observations, and
Duncan Murdoch wrote:
> On 20/06/2008 4:09 AM, Norbert NEUWIRTH wrote:
>> dear userRs,
>> I am deeply ashamed asking you this very basic question, but I did
>> neither get it online nor by the S/R-literature I have.
>> I simply want to plot the values of a COUPLE of vectors within one
>> graph - in
On Sat, 2008-06-21 at 17:56 -0400, Gabor Grothendieck wrote:
> On Sat, Jun 21, 2008 at 12:40 PM, Gavin Simpson <[EMAIL PROTECTED]> wrote:
> > Dear List,
> >
> > I have a problem I'm finding it difficult to make headway with.
> >
> > Say I have 6 ordered observations, and I want to find all combinat
I meant 0:31, not 0:15.
On Sat, Jun 21, 2008 at 5:56 PM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> On Sat, Jun 21, 2008 at 12:40 PM, Gavin Simpson <[EMAIL PROTECTED]> wrote:
>> Dear List,
>>
>> I have a problem I'm finding it difficult to make headway with.
>>
>> Say I have 6 ordered observa
On Sat, Jun 21, 2008 at 12:40 PM, Gavin Simpson <[EMAIL PROTECTED]> wrote:
> Dear List,
>
> I have a problem I'm finding it difficult to make headway with.
>
> Say I have 6 ordered observations, and I want to find all combinations
> of splitting these 6 ordered observations in g groups, where g = 1
> "KM" == Karl Marx <[EMAIL PROTECTED]>
> on Thu, 19 Jun 2008 23:01:31 +0200 writes:
KM> I'm testing R version 2.7.0 on windows and there seems
KM> to be a compatibility issue with objects that were
KM> created by "approxfun" in older versions. As long as the
KM> object
On Sat, Jun 21, 2008 at 03:08:51PM -0500, [EMAIL PROTECTED] wrote:
> Hi All R+Linux users,
>
> I am very new to Linux and I also have the (dis)similar problem. I try
> to install R 2.7.0 on Ubuntu. But I only got the R 2.6.2 version. Could
> anyone tell me how to uninstall R 2.6.2 and install R2
On Sat, 21 Jun 2008, Gavin Simpson wrote:
Dear Chuck,
That is, quite simply, superb! The members of this list never cease to
amaze me, and your response is no exception.
As an aside, does this type of problem come under a particular name or
topic in mathematics?
Yes. Combinatorics. See
Hi All R+Linux users,
I am very new to Linux and I also have the (dis)similar problem. I try
to install R 2.7.0 on Ubuntu. But I only got the R 2.6.2 version.
Could anyone tell me how to uninstall R 2.6.2 and install R2.7.0 on
Ubuntu.
many thanks in advance.
Chunhao
Quoting Graham Smit
Dear Chuck,
That is, quite simply, superb! The members of this list never cease to
amaze me, and your response is no exception.
As an aside, does this type of problem come under a particular name or
topic in mathematics?
The ordering need not be exactly as I had it in my example --- that just
re
I'd like to use rgl.surface (or some other function if more
appropriate) to create a horizontal and vertical transparent grey
slice (plane) running through both the x and y origins and extending
across the z axis, i.e. the 3-d equivalent of the normal 2-d
coordinate axes we are all familiar with. T
This should do it for you:
> x <- read.table(textConnection("ID1 ID2
+ A1B3
+ A1B4
+ A1B3
+ A1B3
+ A2B1
+ A2B1
+ A2B4
+ A3B2
+ A3B2
+ A5B1
+ A5B1
+ A5B6
+ A5B4
+ A6B2"), header=TRUE)
> cbind(x, countID1=ave(seq_along(x$ID1), x$ID1, FUN=leng
On Sat, 21 Jun 2008, Gavin Simpson wrote:
Dear List,
I have a problem I'm finding it difficult to make headway with.
Say I have 6 ordered observations, and I want to find all combinations
of splitting these 6 ordered observations in g groups, where g = 1, ...,
6. Groups can only be formed by a
Hi All.
I have the commands below to create a stripchart/plot. I was hoping to
color the points in the plot by yr, and use a symbol that varied with resp.
However, the outcome makes it appear as though the point by point col and
pch data is not being passed properly. Any suggestions?
And truthf
On Fri, 20 Jun 2008, calundergrad wrote:
i have a vector with a string of number
e.g
[1] 0113001 001130011000 001130012000 001130013000 001130016000
[6] 001130018000
i want a vector with the same numbers except with the last three digits of
every factor cut off.
e.g
[1] 01130010 0011300
Dirk,
Thanks for this, in fact I did notice the error after posting. I didn't
know there was an r-sig-debian list, I shall join and use it for any future
questions of this type.
Graham
2008/6/21 Dirk Eddelbuettel <[EMAIL PROTECTED]>:
> On Sat, Jun 21, 2008 at 06:03:39PM +0100, Graham Smith wr
On Sat, Jun 21, 2008 at 06:03:39PM +0100, Graham Smith wrote:
> Marielle,
>
> Thanks for this. I think I have done as you suggest but still get the public
> key error. Do I need to reboot to get it to work: here is the script:
>
>
> [EMAIL PROTECTED]:~$ gpg --keyserver subkeys.pgp.net --recv E2A
Marielle,
Thanks for this. I think I have done as you suggest but still get the public
key error. Do I need to reboot to get it to work: here is the script:
[EMAIL PROTECTED]:~$ gpg --keyserver subkeys.pgp.net --recv E2A11821
gpg: requesting key E2A11821 from hkp server subkeys.pgp.net
gpg: key
Dear List,
I have a problem I'm finding it difficult to make headway with.
Say I have 6 ordered observations, and I want to find all combinations
of splitting these 6 ordered observations in g groups, where g = 1, ...,
6. Groups can only be formed by adjacent observations, so observations 1
and 4
On 21.06.2008, at 17:25, Marc Schwartz wrote:
on 06/21/2008 09:18 AM Gabor Grothendieck wrote:
On Sat, Jun 21, 2008 at 8:31 AM, Wacek Kusnierczyk
<[EMAIL PROTECTED]> wrote:
Hans-Jörg Bibiko wrote:
On 21.06.2008, at 01:36, Ken Liu wrote:
I would like to convert a character vector
xxx <- c("1/2
> I am trying to get synaptic to work with R
>
> I have added http://cran.uk.r-project.org/bin/linux/ubuntu as the URL and
> hardy/ as the distribution.
Try a different mirror, I used http://cran-mirror.cs.uu.nl/. When you try
apt-get update, you'll get a warning (that's better than an error ;)
Can't you just import data from Excel using RODBC, then use your function in
R, and then write the results to Excel again? It would be much less painful
than doing it in VBA...
Otherwise, look for MMult and Transpose and similar things in VB help, and
then ask some VB experts...
Kenn
On Sat, Jun
on 06/21/2008 10:25 AM Luis Orlindo Tedeschi wrote:
All; this might be an easy question but I cannot make it work. I would
like to set the min and max of the y axis of a plot. I know I have to
use par("usr"), but after I do the plot() the axis values get changed.
x<-rnorm(20)
Y<-x+rnorm(20,0,.1)
On 21/06/2008 11:25 AM, Luis Orlindo Tedeschi wrote:
All; this might be an easy question but I cannot make it work. I would
like to set the min and max of the y axis of a plot. I know I have to
use par("usr"), but after I do the plot() the axis values get changed.
x<-rnorm(20)
Y<-x+rnorm(20,0,.1
All; this might be an easy question but I cannot make it work. I would
like to set the min and max of the y axis of a plot. I know I have to
use par("usr"), but after I do the plot() the axis values get changed.
x<-rnorm(20)
Y<-x+rnorm(20,0,.1)
plot(y,x)
par("usr")
# let's say I have -2.8 1.15 -2
on 06/21/2008 09:18 AM Gabor Grothendieck wrote:
On Sat, Jun 21, 2008 at 8:31 AM, Wacek Kusnierczyk
<[EMAIL PROTECTED]> wrote:
Hans-Jörg Bibiko wrote:
On 21.06.2008, at 01:36, Ken Liu wrote:
I would like to convert a character vector
xxx <- c("1/2", "1/4")
to
yyy <- c(0.5, 0.25)
, but as.
On Sat, Jun 21, 2008 at 3:36 AM, Karin Lagesen <[EMAIL PROTECTED]> wrote:
>
> Hello list:)
>
> I have lots of values which I would like to get a histogram outline
> out of.
>
> An example of what I am talking about:
>
> testdata = runif(100)
> bbb = seq(0,1, by = 0.01)
> hist(testdata, breaks = bbb
Hello list:)
I have lots of values which I would like to get a histogram outline
out of.
An example of what I am talking about:
testdata = runif(100)
bbb = seq(0,1, by = 0.01)
hist(testdata, breaks = bbb)
I would like to get the outline of the resulting histogram.
Now, I think that I can do t
On Sat, Jun 21, 2008 at 1:00 AM, Mark Farnell <[EMAIL PROTECTED]> wrote:
> I wish to draw a graph representing multiple series (sets of x,y
> points). Each series has its own label and points within each series
> are joined by a line ordered by their X cooridnate.
>
> I would also like a legend au
Cleber Nogueira Borges wrote:
Hello Uwe Ligges,
Thanks for your attention
I run the code with option: debug=T, so I get the log file!
I think that the stone in my shoe is: "educational version cannot do
this model"...
Am I right?
I think so, so why do you not simply get the full version o
?plot
?lines
used together. Note you need to set type="l" in plot
--- On Sat, 6/21/08, Mark Farnell <[EMAIL PROTECTED]> wrote:
> From: Mark Farnell <[EMAIL PROTECTED]>
> Subject: [R] a high-level command for drawing a multiple series graph with
> each series having a label
> To: R-help@r-proj
Hello Uwe Ligges,
Thanks for your attention
I run the code with option: debug=T, so I get the log file!
I think that the stone in my shoe is: "educational version cannot do
this model"...
Am I right?
TIA
Cleber
--
display
On Sat, Jun 21, 2008 at 8:31 AM, Wacek Kusnierczyk
<[EMAIL PROTECTED]> wrote:
> Hans-Jörg Bibiko wrote:
>>
>> On 21.06.2008, at 01:36, Ken Liu wrote:
>>> I would like to convert a character vector
>>>
>>> xxx <- c("1/2", "1/4")
>>>
>>> to
>>>
>>> yyy <- c(0.5, 0.25)
>>>
>>>
>>> , but as.numeric did
Hi everyone,
I want to convert an R function into VBA for calculating the eigenvectors and
eigenvalues of a matrix using the "Power Method". The function is:
PowerMethod <- function(x, tolerance) {
my.mat <- var(x[,-1], na.method="available")
matSize <- dim(my.mat)[1]
eigenVec <- ma
Yes: Please do what the error message tells you to do.
Uwe Ligges
Cleber Nogueira Borges wrote:
Hi,
I tried to use MethComp library and this library make use of the WinBUGS
by R2WinBuGUS,
but I get the follow error in bugs.run:
*Error in bugs.run(n.burnin, bugs.directory, WINE = WINE, useW
Nathan Leon Pace, MD, MStat wrote:
In a generalized linear model with k covariates, there are 2(kth power) - 1
possible models (excluding interactions).
Awhile ago a posting to R-help suggested Model Selection and Multimodel
Inference, 2nd ed, by Burnham and Anderson as a good source for
underst
Hi Denis,
>> h = c("3h30", "6h30", "9h40", "11h25", "14h00",
>> "15h55", "23h")
>> I could not figure out how to use chron to import this into times, so
>> I tried to extract the hours and minutes on my own.
Look at ?strptime for this:
##
strptime("6h30", format="%Ih
Hans-Jörg Bibiko wrote:
>
> On 21.06.2008, at 01:36, Ken Liu wrote:
>> I would like to convert a character vector
>>
>> xxx <- c("1/2", "1/4")
>>
>> to
>>
>> yyy <- c(0.5, 0.25)
>>
>>
>> , but as.numeric didn't work for me. Could anyone give me a hint
>> please?
>
> There are many many ways, and t
What is this statement supposed to do:
gc<-dat(1:19)
You are trying to call the function 'dat' with a vector of 19 values.
Is this what you intended? If the function 'dat' does not exist,
that is why you are getting the error.
On Sat, Jun 21, 2008 at 2:46 AM, Paul Adams <[EMAIL PROTECTED]> wr
You can play around with something like this to control the plots and
to add color to them:
data(HairEyeColor)
a <- as.table( apply(HairEyeColor, c(1,2), sum) )
a1<-a[1:2,]
library(lattice)
library(reshape)
x <- melt(a1)
p1 <- barchart(value ~ Eye, group=Hair, data=x)
p2 <- barchart(value ~ Hai
... or try to avoid unnecessarily complex code, and just type
sapply(parse(text=xxx), eval)
vQ
Kenn Konstabel wrote:
> another way to do it is using eval and parse:
>
> yyy<-numeric()
> for(i in 1:length(xxx)) yyy[i] <- eval(parse(text=xxx[i]))
>
> or ...
>
> unlist(lapply(as.list(xxx), functi
Is this something like you want? I assume you could also create a dialog box:
number.clicks<-4
my.coords<-NULL
for (i in 1:number.clicks)
{
plot(0,0, type="n")
seg1<-arrows(-0.5,-1,0.5,0, col=1)
seg2<-arrows(0,-1,-0.3,0.3, col=2)
seg3<-arrows(0.2,-0.7,-0.5,0, col=4)
if
Kenn Konstabel wrote:
another way to do it is using eval and parse:
yyy<-numeric()
for(i in 1:length(xxx)) yyy[i] <- eval(parse(text=xxx[i]))
or ...
unlist(lapply(as.list(xxx), function(x) eval(parse(text=x
or even
sapply(parse(text=xxx), eval)
(Beware that this can have unforeseen
Dear Ben,
Do you mean "Statistical Computing" by Crawley? In that case, there is a
web appendix showing some differences between R and S-Plus.
There is also John Fox´s Book "Companion to Applied Linear Regression"
that compares R and S-Plus, and Richard Heiberger´s book (Heiberger &
Holland) comp
Maybe this is more a Ubuntu question,but...
I am trying to get synaptic to work with R
I have added http://cran.uk.r-project.org/bin/linux/ubuntu as the URL and
hardy/ as the distribution.
But when I reload the repositories, I get an error
Failed to fetch
http://cran.uk.r-project.org/bin/linux/
another way to do it is using eval and parse:
yyy<-numeric()
for(i in 1:length(xxx)) yyy[i] <- eval(parse(text=xxx[i]))
or ...
unlist(lapply(as.list(xxx), function(x) eval(parse(text=x
then xxx can contain any valid expressions (not necessarily fractions)
Kenn
On Sat, Jun 21, 2008 at 12:4
On 20.06.2008, at 19:27, calundergrad wrote:
i have a vector with a string of number
e.g
[1] 0113001 001130011000 001130012000 001130013000 001130016000
[6] 001130018000
i want a vector with the same numbers except with the last three
digits of
every factor cut off.
e.g
[1] 01130010
On 21.06.2008, at 01:36, Ken Liu wrote:
I would like to convert a character vector
xxx <- c("1/2", "1/4")
to
yyy <- c(0.5, 0.25)
, but as.numeric didn't work for me. Could anyone give me a hint
please?
There are many many ways, and they're depending on the structure of
xxx. If you on
Andrew Robinson wrote:
In your data, subject is nested within sequence. Was that your
intention?
Presumably yes. This looks like a standard cross-over design.
I fail to see what the interaction between subject and sequence might
mean, so I also have no idea what SPSS might have done. (Th
Thanks, I think I've got it on Mac. Will try with my windows station
tomorrow.
Best,
Anh Tran
On Jun 21, 2008, at 12:05 AM, Prof Brian Ripley wrote:
Please see the footer of this message. What do you want to be
transparent, and what did you use to try to get it (there are many
possibil
Dear Hsin-Ya,
Then it might be that you have checked "Type 3 sums of squares" in SPSS,
while R uses type 1 by default.
>
> Dear Dr. Andrew Robinson:
>
> Thanks for your reply. In my data, subject is nested within sequence.
> According to Dr. Christoph's reply, I have change the sequence data.
>
Please see the footer of this message. What do you want to be
transparent, and what did you use to try to get it (there are many
possibilities)? What OS and version of R is this?
Note that the default value of "bg" for the png() and tiff() devices is
"white", and the Windows version of the t
61 matches
Mail list logo