you could try :
trt1 <- do.call("rbind", lapply(listexp, function(x) {
zz <- aggregate(t(x), list(rep(1:3, each=2)), mean)[,-1]
zz <- as.matrix(zz)
sweep(zz[1:2,], 2, zz[3,], "-")[1,]}))
trt2 <- do.call("rbind", lapply(listexp, function(x) {
zz <- aggregate(t(x), list(rep(1:3, eac
I would like to thank everybody who replied for their useful suggestions and
especially the person who (since you replied privately, I do not know if I
may expose your name or function) provided the "nkpartitions" function, that
does exactly what I wanted.
Thank you all again!
Best,
Ales Z
Can you tell us which package that function is in?
Google on the r-project site nor on the www produced a hit.
best, ingmar
> From: "Ales Ziberna" <[EMAIL PROTECTED]>
> Date: Fri, 9 Dec 2005 09:22:47 +0100
> To: "R-help"
> Subject: Re: [R] Finding all possible partitions of N units into k classe
That explains it. Thanks. I don't need rownames though, as I'll only ever
use integer subscripts. Is there anyway to drop them, or even better not
create them in the first place? The memory saved (90%) by not having them
and 10 times speed up would be very useful. I think I need a data.frame
rathe
Eric,
Have you tried just copying your data from your email (this mail, e.g.)
to your preferred text editor, removing any mailer-inserted leading
characters, ensuring a newline at the end of the last line, and then
using read.table (perhaps via the clipboard if you're on Windows)?
Works for me wit
On 09-Dec-05 Ingmar Visser wrote:
> Can you tell us which package that function is in?
> Google on the r-project site nor on the www produced a hit.
> best, ingmar
I would be interested in this too! From the name "nkpartitions"
it would seem that this function generates the ways of distributing
n
Hello there
This is the first time I have used r-help message board so I hope I have got
the right address.
I am trying to check the residuals of a GLMM model(run using the package
lme4). I have been able to check the residiuals of REMLs in lme4 using the
following:
m1<-lmer(vTotal~Week+fCollar+
Hello,
Sorry if this question was already asked (I though it was... but did not
found the exact answer in the archives).
I use R 2.2.0 and just updated to Firefox 1.5 (note that I already got
the same result with Firefox 1.x.x) under Win XP sp2 US (full details of
my config hereunder). When I
Hi
I just installed R 2.2.0 on Windows 2000. I was quite surprised to find the
console language set to german (I live in the german part of Switzerland).
In the last hour I read the FAQ and I searched the mail archives, but I
failed to change the language according to the instructions given. The
As to my knowladge, the function is not located in any packages. If you
wish, I can contact the author and ask him, if he is willing to post the
function on to the list.
Best,
Ales Ziberna
- Original Message -
From: "Ingmar Visser" <[EMAIL PROTECTED]>
To: "Ales Ziberna" <[EMAIL PROTECT
Hello everyone
I have a case in which i need some help. I have evaluated the partial
correlations of a data.frame (n=160, variables=7) using the command pcor.shrink
(library "corpcor") and then i want to evaluate the confidence intervals of
these estimations by using the command pcor.confint (l
Dear R users:
> C1
timeX1
1 0.5 6.296625
2 1.0 10.283977
3 1.5 12.718610
4 2.0 14.112740
5 3.0 15.053917
6 4.0 14.739725
7 6.0 12.912230
8 8.0 10.893264
9 0.5 6.289166
10 1.0 10.251247
11 1.5 12.651346
12 2.0 14.006958
13 3.0 14.870618
14 4.0 14.487026
15 6.0 1
Hi
insert a line of NAs into your data and the line won't
cross it:
> a <- cbind(1:10,10:1)
> aa <- a[append(1:10,NA,after=4),]
> plot(aa,type="b")
>
HTH
rksh
On 9 Dec 2005, at 11:48, Rhett Eckstein wrote:
> Dear R users:
>
>> C1
>timeX1
> 1 0.5 6.296625
> 2 1.0 10.2839
Hello R - users,
This may sound simple to may people:
I have a list of data as follows
type value
y 7
y 7
y 8
y 8
y 8
y 9
y 9
y 9
y 9
y 10
y 10
y 10
y 10
y 11
y 11
y 12
y 12
y 14
On 09-Dec-05 Rhett Eckstein wrote:
> Dear R users:
>
>> C1
>timeX1
> 1 0.5 6.296625
> 2 1.0 10.283977
> 3 1.5 12.718610
> 4 2.0 14.112740
> 5 3.0 15.053917
> 6 4.0 14.739725
> 7 6.0 12.912230
> 8 8.0 10.893264
> 9 0.5 6.289166
> 10 1.0 10.251247
> 11 1.5 12.651346
Set Data the data frame of your data, it is straightforward to define x
and y by
R> x <- Data[Data$type=="x",-1]
R> y <- Data[Data$type=="y",-1]
Best regards,,
Kristel
Subhabrata wrote:
> Hello R - users,
>
> This may sound simple to may people:
>
> I have a list of data as follows
>
> t
On 12/9/05 7:19 AM, "Subhabrata" <[EMAIL PROTECTED]> wrote:
>
> Hello R - users,
>
> This may sound simple to may people:
>
> I have a list of data as follows
>
> type value
> y 7
> y 7
> y 8
> y 8
> y 8
> y 9
> y 9
> y 9
> y 9
>
I guess you are using obsolete versions of lme4 / Matrix. Please
update and try again. The current versions are:
> help(package = "Matrix")
Information on package 'Matrix'
Description:
Package: Matrix
Version: 0.99-2
Date: 2005-11-14
[s
Thank you first.
Now there is no straight line in the plot.
when i using:
aa <- C1[append(1:16,NA,after=8),]
plot(aa,type="l")
But if C1 is a more than 16 ( time v.s. X1 ) list.
for example: 64 (time v.s. X1)
aa <- C1[append(1:64,NA,after=8),]
just let one line disappear, others still appear
wh
Rhett Eckstein wrote:
> Dear R users:
>
>
>>C1
>
>timeX1
> 1 0.5 6.296625
> 2 1.0 10.283977
> 3 1.5 12.718610
> 4 2.0 14.112740
> 5 3.0 15.053917
> 6 4.0 14.739725
> 7 6.0 12.912230
> 8 8.0 10.893264
> 9 0.5 6.289166
> 10 1.0 10.251247
> 11 1.5 12.651346
> 12 2
nkpartitions <- function(n, k, exact=FALSE, print=FALSE) {
# n objects
# k subgroups
# exactly k or at most k?
# print results as they are found?
if (n != floor(n) | n<=0) stop("n must be positive integer")
if (k != floor(k) | k<=0) stop("k must be positive integer")
if (print) {
p
Dear list,
I want to retrieve the p-value of a two-polynomial regression. For a
one-polynomial lm I can easily do this with:
summary(lm(b~a, data=c)[[4]][[8]].
But how do I find the final p-value in the two-polynomial regression? Under
$coefficients I don't find it
Any suggestions?
Patrick
alt
Hello R-Users,
I have to invert a matrix 3000X3000 and the solve method doesn't work or it
is too slow.
Are there any methods to invert a big matrix?
Regards
Stefan
-
[[alternative HTML version deleted]]
__
Beyond asking why, and not letting R do work for you, let me just note
that inverting the full matrix is often computationally wasteful. You
can take the Cholesky decomposition M = L'L where M is your matrix and
then only work with L. Other than that, there are two packages for
dealing with sparse
On 12/9/05, Nicola Salvati <[EMAIL PROTECTED]> wrote:
> Hello R-Users,
> I have to invert a matrix 3000X3000 and the solve method doesn't work or it
> is too slow.
> Are there any methods to invert a big matrix?
Well, first you figure out what you really need to do. Although we
often write f
Hi Patrick,
try:
lm.res.2$coefficients
which I found by looking at the content of the function 'summary.lm'.
Christian
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.
On Fri, 2005-12-09 at 14:19 +0100, Patrick Kuss wrote:
> Dear list,
>
> I want to retrieve the p-value of a two-polynomial regression. For a
> one-polynomial lm I can easily do this with:
> summary(lm(b~a, data=c)[[4]][[8]].
>
> But how do I find the final p-value in the two-polynomial regression
On Fri, 2005-12-09 at 14:19 +0100, Patrick Kuss wrote:
> Dear list,
>
> I want to retrieve the p-value of a two-polynomial regression. For a
> one-polynomial lm I can easily do this with:
> summary(lm(b~a, data=c)[[4]][[8]].
>
> But how do I find the final p-value in the two-polynomial regressio
Hi Ariel,
ok, you want to change the language?
Right click on the R icon on the desktop, choose "Properties". In the
field "Destination" you add at the end of the line":
language=it" (Italian) or " language=fr" (French)
Then the line should look somewhat like: (for Italian)
C:\Programs\r
If your data frame is X then
unstack(X, value ~ type)
gives you a list with x and y components. If you need
these as variables try attach(unstack(X, value ~ type))
or
with(unstack(X, value ~ type, {
... some computations ...
}
On 12/9/05, Subhabrata <[EMAIL PROTECTED]> wrote:
>
> Hello R -
You can change the language setting during the
installation, it is just not that obvious though.In
the "selection components" step of installation,
uncheck the "message translations".It should be OK
then.
--- Ariel Bergamini <[EMAIL PROTECTED]> wrote:
> Hi
>
> I just installed R 2.2.0 on Windows
This is very useful, thanks for posting!
I created a page for this at the R Wiki:
http://fawn.unibw-hamburg.de/cgi-bin/Rwiki.pl?DataBases
If any one has any info to add, go at it!
-- Tony Plate
charles loboz wrote:
> 1. That was a part of a private email exchange. It has
> been suggested that
On Fri, 9 Dec 2005, Philippe Grosjean wrote:
Hello,
Sorry if this question was already asked (I though it was... but did not
found the exact answer in the archives).
I use R 2.2.0 and just updated to Firefox 1.5 (note that I already got
the same result with Firefox 1.x.x) under Win XP sp2 US (
I am trying to create a .jpg file with multiple graphs on it. I am creating
this file through a java servlet which connects to R using RServe. In the
code below, col is an int array which has a list of the col numbers of the
data file whose data i have to use for plotting.
c=new Rconnection();
Hi, I have 2 list objects, say list1 and list2
Each element of list1 is a list with components: model, pcorrect
Each element of list2 has a single unnamed numeric value
What I would like to do is to be able to combine list1 and list2 to give
list3 such that
list3 is a list where each element is
Something like this should do:
> mapply(c, list1, list2, SIMPLIFY=FALSE)
[[1]]
[[1]]$model
[1] 1
[[1]]$pcorrect
[1] 2
[[1]][[3]]
[1] 9
[[2]]
[[2]]$model
[1] 3
[[2]]$pcorrect
[1] 4
[[2]][[3]]
[1] 10
Andy
From: Rajarshi Guha
>
> Hi, I have 2 list objects, say list1 and list2
>
> Each elem
> Each element of list1 is a list with components: model, pcorrect
> Each element of list2 has a single unnamed numeric value
>
> What I would like to do is to be able to combine list1 and list2 to give
> list3 such that
mapply(c, list1, list2, SIMPLIFY=F) should get you started.
Hadley
___
dear r-helpers,
it seems the colors in an automatically generated lattice legend
recycle after the 8th color, even when the user has set e.g.
superpose.symbol$col to be longer than 8. the following example will
illustrate what i mean:
z <- data.frame(x=rep(letters[1:15], each=4), y=rnorm(60),
On 12/9/05, alejandro munoz <[EMAIL PROTECTED]> wrote:
> dear r-helpers,
>
> it seems the colors in an automatically generated lattice legend
> recycle after the 8th color, even when the user has set e.g.
> superpose.symbol$col to be longer than 8. the following example will
> illustrate what i mea
I have a similar problem here:
/tmp/RtmpgRyAdm/.R/doc/manual/R-exts.html
the folder structure exists just no files in it. There are subfolders
with files and symlinks in so I doubt its a permissions problem.
> R.Version()
$platform
[1] "x86_64-pc-linux-gnu"
$arch
[1] "x86_64"
$os
[1] "linux-gnu
Greetings - is there any update on a PostgreSQL driver for the DBI
package? If not, what's the currently-preferred method of creating a link
from a PostgreSQL database and R?
Thanks.
--
Andrew J Perrin - andrew_perrin (at) unc.
Having missed last months thread I reinvented the wheel. I thought I'd
post my code here for fun and feedback.
getDerivation<-function(v_dataset){
#setup a vector to hold derivations
v_deriv<-vector(length=length(v_dataset)-1)
for(iLoc in 2:length(v_dataset)){
v_deriv[iLoc-1]<
On 12/9/05 1:10 PM, "Andrew Perrin" <[EMAIL PROTECTED]> wrote:
> Greetings - is there any update on a PostgreSQL driver for the DBI
> package? If not, what's the currently-preferred method of creating a link
> from a PostgreSQL database and R?
See RdbiPgSQL:
http://www.bioconductor.org/packag
Hello, Jacques,
Thank you very much for your help!
It's clever code and works fine. But I don't understand what the last line code
is for. Should I really need the last line?
Thanks again.
Josh
Quoting Jacques VESLOT <[EMAIL PROTECTED]>:
> you could try :
>
> trt1 <- do.call("rbind", lapply(liste
That's Rdbi, not DBI, and so not the question. (Rdbi is a precursor to
DBI, and DBI is now ca 5 years old.)
I've heard nothing about a PostgreSQL driver for DBI for a long time.
Meanwhile, RODBC continues to work with PostgreSQL, as it has done for
several years.
On Fri, 9 Dec 2005, Sean Davis
I have been using lme from nlme to do a 3-way anova with all the effects
treated as random. I was wondering if someone could direct me to an example of
how to do this using lmer from lme4.
I have 3 main effects, tim, trt, ctr, and all the interaction effects
tim*trt*ctr. The response variable
Hi,
Someone can tell me a function for clearing the console without using the menu
bar?
Thanks,
Manel
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/pos
Dear Madams/Sirs,
Hello. I am using the gls function to specify an arma correlation during
estimation in my model. The parameter values which I am sending the
corARMA function are from a previous fit using arima. I have had some
success with the method, however in other cases I get the followin
I realize that others have struggled with this issue...i.e.
http://tolstoy.newcastle.edu.au/~rking/R/help/05/01/9826.html
i am on os.x 10.4 w/ R2.2, and am (perhaps foolishly) also on this quest...
i would like to be able to install downloaded source (tar.gz'd) files from
within an R session,
Dear R-helpers,
Is there somebody who knows if R has already a build in function for
Hierarchical Clustering which uses Mutual Information as proximity measure?
Many thanks and best regards,
J.
-
[[alternative HTML vers
What OS? In Windows, what's wrong with pressing Ctrl-L?
Peter Ehlers
Manel Salamero wrote:
> Hi,
>
> Someone can tell me a function for clearing the console without using the
> menu bar?
>
> Thanks,
>
> Manel
>
> __
> R-help@stat.math.ethz.ch mail
Hi,
I see in Wettenhall RTclTk Examples that tkbind(xxx, ,...) can pass the
key pressed. How can I get the key pressed?
Thanks,
Manel
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gui
Prof Brian Ripley wrote:
> On Fri, 9 Dec 2005, Philippe Grosjean wrote:
>
>> Hello,
>>
>> Sorry if this question was already asked (I though it was... but did not
>> found the exact answer in the archives).
>>
>> I use R 2.2.0 and just updated to Firefox 1.5 (note that I already got
>> the same re
It is pkgType="source", not method="source". (What the default is on your
platform depends on the version of R you are using: 'OS X' is presumably
MacOS, but there are several different builds for MacOS with different
defaults.)
If used as documented, install.packages() does install from packa
"Manel Salamero" <[EMAIL PROTECTED]> writes:
> Hi,
>
> I see in Wettenhall RTclTk Examples that tkbind(xxx, ,...) can
> pass the key pressed. How can I get the key pressed?
By making the callback function have an argument with a specific name.
Lookup the %-codes in the Tk man page for "bind". T
Andrew Perrin wrote:
> Greetings - is there any update on a PostgreSQL driver for the DBI
> package? If not, what's the currently-preferred method of creating a link
> from a PostgreSQL database and R?
Some colleagues and I have been using RODBC with it successfully, from
Windows and Linux mach
HELLO ERIC:
The documentation for "extend.series" indicates that "zero" is an
option for "method". However, consider the followining:
> extend.series(c(0, pi), method="zero")
Error in extend.series(c(0, pi), method = "zero") :
Invalid argument value for 'method'
If
RODBC is great! Same code works on both linux and windows. I been using it
for
more than 2 years now. Highly recomanded.
On 12/9/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
>
> Andrew Perrin wrote:
> > Greetings - is there any update on a PostgreSQL driver for the DBI
> > package? If not, what'
58 matches
Mail list logo