On 12/20/2012 02:13 PM, arun wrote:
> library(gtools)
> permutations(2,10,0:1,repeats.allowed=TRUE)
This does what I need, but if I increase a number of permutations (59
instead of 10), then I get an error.
Error: cannot allocate vector of size 1.5 Gb
Is there a smart way of increasing the maxim
On 12/20/2012 02:13 PM, arun wrote:
> library(gtools)
> permutations(2,10,0:1,repeats.allowed=TRUE)
Thanks, this is exactly what I need.
Regards,
Olga
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Thanks Ista,
Very instructive and works like a charm!
Cheers!
Olga
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, mi
Dear all,
Using:
library(vegan)
data(BCI)
mod <- radfit(BCI[1,])
mod
RAD models, family poisson
No. of species 93, total abundance 448
par1 par2 par3Deviance AIC BIC
Null 39.5261 315.4362 315.4362
Preemption 0.042797
if I try as.dist I get the following error:
On Thu, 2010-09-02 at 09:57 -0400, Sarah Goslee wrote:
> > mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3))
> > as.dist(cor(mydata))
>x1 x2
> x2 -0.5960396
> x3 0.3973597 0.500
print(xtable(as.dist(cor(mydata)),digits=3)
Dear all,
mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3))
cor(mydata)
x1 x2x3
x1 1.000 -0.5960396 0.3973597
x2 -0.5960396 1.000 0.500
x3 0.3973597 0.500 1.000
I wonder if it is possible to fill only lower triangle of this
correlation matr
On Wed, 2010-09-01 at 12:42 -0400, David Winsemius wrote:
> I suspect you might have tried (df-mean(df))/sd(x) and gotten
> unsatisfactory results; I know I did.
yes, indeed! a few times, but why is that?
> If you had really wanted to
> persist and do it from first principles, so to speak,
Thanks! It is exactly what I was looking for!
Cheers
Olga
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
Dear all,
I have a dataframe:
df<-dataframe(a=c(1,2,3),b=c(4,5,6),c=c(7,8,9),d=c(10,11,12))
I want to obtain a new dataframe with columns a and b being standardized
((x-mean(x))/sd(x)); the other two columns (c,d) I want to leave
unchanged. What is the best way to achieve this? I have been try
Thanks Dimitris,
It works nicely!
Regards,
Olga
On Thu, 2010-08-26 at 11:55 +0200, Dimitris Rizopoulos wrote:
> one way is the following:
>
> mylist <- list(x1 = c("A","A","A","B","C","Z","Y"),
> x2 = c("D","D","E","E","F","Z","X"),
> x3 = c("A","A","A","B","Y","Z"))
> newlist <- c("
Dear all,
I have a list that contains 3 sublists( x1, x2, x3)
mylist<-list(x1=c("A","A","A","B","C","Z","Y"),x2=c("D","D","E","E","F","Z","X"),x3=c("A","A","A","B","Y","Z"))
mylist
$x1
[1] "A" "A" "A" "B" "C" "Z" "Y"
$x2
[1] "D" "D" "E" "E" "F" "Z" "X"
$x3
[1] "A" "A" "A" "B" "Y" "Z"
I also ha
Wu Gong wrote:
> So, try() inside loop should work. Like
>
> for () {
> if (class(try(...,silent=T))=="try-error") result[[i]] <- NA
> ...
> }
Thanks a lot, it worked for me!
Cheers
Olga
__
R-help@r-project.org mailing list
https://stat.ethz
On Thu, 2010-08-05 at 10:59 +0100, Liviu Andronic wrote:
> On Thu, 05 Aug 2010 11:13:00 +0200
> Olga Lyashevska wrote:
> > I do not have any desktop environment (running R on a server), can I
> > still try xfce?
> >
> I am not very sure. If you are running gnome-te
Dear all,
I run a loop wrapped in try(), and for each of the rows where
"try-error" is true I want to fill that row with NA (at the moment it is
omitted). So I would expect to get a dataframe with 1000 rows some of
which would be empty, but instead I get a dataframe with 995 rows. In
this case mi
Thanks Liviu,
On Thu, 2010-08-05 at 09:51 +0100, Liviu Andronic wrote:
> On Thu, 05 Aug 2010 08:56:30 +0200
> Olga Lyashevska wrote:
> > I am using gnome-terminal to run R, and I noticed that standard
> > PageUp/Down do not work but they do work for other programs within the
Dear all,
I am using gnome-terminal to run R, and I noticed that standard
PageUp/Down do not work but they do work for other programs within the
same terminal window (e.g. irssi). Scroll bar does not work either.
I run R using GNU-screen, but it doesn't seem to make any difference.
Many thanks
O
iginal Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Steven McKinney
> Sent: 03 August 2010 21:05
> To: Olga Lyashevska; r-help@r-project.org
> Subject: Re: [R] multiple R sessions from one working directory using
> GNU sc
uster computing with R might help you figure out
> strategies to share bits of data and information across multiple R sessions.
>
> HTH
>
>
> Steven McKinney
>
> From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf
&
Dear all,
I am using GNU screen to run multiple R sessions from one working
directory in order to split task, however I noticed that dataset is not
synchronized e.g. if I have two sessions R1 and R2, and I remove an
object from R1, R2 doesn't change as expected or change at random.
I have tried to
Hello,
I want to compare 6 non-nested models
lm(Y1~X11),lm(Y1~X12),lm(Y1~X13),lm(Y1~X14),lm(Y1~X15),lm(Y1~X16)
based on their R2 values.
I am using jtest as following:
jtest(lm(Y1~X11),lm(Y1~X12))
jtest(lm(Y1~X11),lm(Y1~X13))
jtest(lm(Y1~X11),lm(Y1~X14))
etc
Is there is a way to general
suitable tool to use.
However, it also means that I cannot plot probability density curve
using this type of data because I would need to have a histogram
instead. Did I get it right?
Many thanks,
Olga
On 03/15/2010 08:32 AM, Olga Lyashevska wrote:
Dear all,
I am making a barplot as
Dear all,
I am making a barplot as following:
barplot(c(1,2,3,5,2,3,1),names.arg=c("100","200","300","400","500","600","700"),xlab="diameter",ylab="flow",main="some
title",space=0.1)
I am also trying to add a probability density curve, however using
lines(density(c(1,2,3,5,2,3,1))) does not gi
Dear all,
I was wondering if there is a way to explore a syntax of particular
function without package installation?
I am trying to write my own functions, and I would like to see how
other people approached similar problems. If every time I have to
install/load package to be able to explor
Hello all,
Here is my solution, in case someone else needs it.
I have a dataframe consisting of two columns.
col1<-factor(c("a","a","b","b","c","c"))
col2<-factor(c("a","b","c","d","e","f"))
somedf<-data.frame(col1,col2)
somedf
col1 col2
1 a d
2 a e
3 b f
Thanks Thierry!
On 04.02.2010, at 13:22, ONKELINX, Thierry wrote:
selection <- subset(somedf, col1 != "a")
sample(selection$col2, 2, replace = TRUE)
I simplified it, but in fact it is not only 'a' to be eliminated, but
thousands of rows.
Can I use:
col1sample<-sample(col1,2,replace=T)
Hello,
I have a dataframe consisting of two columns.
> col1<-factor(c("a","a","b","b","c","c"))
> col2<-factor(c("a","b","c","d","e","f"))
> somedf<-data.frame(col1,col2)
> somedf
col1 col2
1 a d
2 a e
3 b f
4 b g
5 c h
6 c i
> s
Dear all,
I am working with taxonomic data, represented as a list of classes,
orders, families, genera and finally species.
> class(mydata)
[1] "data.frame"
> mode(mydata)
[1] "list"
> names(mydata)
[1] "tclass" "torder" "tfamily" "tgenus" "tspecies"
> length(mydata$tclass)
[1] 161590
Jim point you use a java client to connect to MSSQL through
RJDBC which you may use for example a free jDBC driver like jTDS.
Caveman
On Wed, Jan 27, 2010 at 12:44 PM, Olga Lyashevska
wrote:
Hi David,
I have a client running Microsoft SQL Server. I am interested in
ways of accessing data
Hi David,
> I have a client running Microsoft SQL Server. I am interested in
> ways of accessing data from this server using R.
>
Why don't you try RMySQL package? It works fine for me.
[[alternative HTML version deleted]]
__
R-help@r-project
Hi Nathan,
I have a table (contact) with several fields and it's PK is an auto
increment field. I'm bulk loading data to this table from files
which if successful will be about 3.5million rows (approx 16000 rows
per file). However, I have a linking table (an_contact) to resolve a
m:m rela
Thanks for your suggestions Mark,
On 04.08.2009, at 19:16, Mark Wardle wrote:
Alternatively, can't you copy the data to the Linux box using sftp
first?
This is perhaps the easiest option. I have established sftp
connection. Now I simply add all files I need to use.
So the problem is solve
Thanks Barry and Steve,
I am trying to import data with read.csv and my file is on remote
machine.
I believe that I need to open a connection, not sure about syntax
though.
Probably works with ftp: too. How remote is it?
In fact it is a bit more complicated.
I am working on a Mac machine,
Dear all,
I am trying to import data with read.csv and my file is on remote
machine.
I believe that I need to open a connection, not sure about syntax
though.
I would appreciate any suggestions,
Thanks!
Olga
__
R-help@r-project.org mailing list
33 matches
Mail list logo