Displaying 20 results from an estimated 2000 matches similar to: "How to sort TWO columns ?"
2004 Jul 15
1
About lattice plots and loops
I cannot operate lattice plots, notably those in package gstat, within for()
loops.
(I can neither read such graphics included in a .R (or .txt) file with the
source() function).
However same commands executed one by one don't fail.
Could you please help me find a means to execute lattice plots inside a loop
?
Jacques VESLOT
CIRAD
-----------------------------------------------------
2005 Jan 21
5
functions not found after installing DBI/RDBI packages
Hi,
I would like to be able to use R with a connection to a PostgreSQL database. I am using R 2.0.1 on windows XP. I have tried installing both the DBI and rDBI packages (which is better?) but in either case I run into the same problem - when i try to use either the dbDriver or dbConnect functions i'm told the function couldn't be found. Seems like the packages aren't installing
2005 Jan 26
3
Still avoiding loops
Dear all,
I have a matrix X with 47 lines and say 500 columns - values are in {0,1}.
I'd like to compare lines.
For that, I first did:
for (i in 1:(dim(X)[1]-1))
for (j in (i+1):dim(X)[1]) {
Y <- X[i,]+Y[j,]
etc.
but, since it takes a long time, I would prefer avoding loops;
for that, my first idea was to add this matrix:
X1=X[,rep(1:46,46:1)]
to this one:
res=NULL
for (i in
2006 Mar 29
6
which function to use to do classification
Dear All,
I have a data, suppose it is an N*M matrix data. All I want is to classify it into, let see, 3 classes. Which method(s) do you think is(are) appropriate for this purpose? Any reference will be welcome! Thanks!
Best,
Baoqiang Cao
2005 Jan 21
1
an R script editor for Mac
JGR has an fairly intelligent editor, and it works on Mac.
Andy
> From: Sean Davis
>
> Consider using ESS and xemacs or emacs. You get syntax highlighting,
> auto-indent, command auto-complete, transcripts for your session,
> integrated help, and the tools of one of the most powerful
> text editors
> on the planet. The learning curve is a bit steep, but if you use R
2004 Jul 29
3
2 questions : format and hh:mm
Dear R-users,
i have two questions :
1- first of all, i wish to know the way to obtain a serie with a format
like "00" : ( "01","02","03","04"....) or like postal code
("01100","02222").
for instance, i do :
> format(strptime(as.character(c(1:4)),"%H"),"%H")
but it sounds complicate and not really
2005 May 18
1
Line width through plot size reduction
Dear R-users,
Someone, who uses R under Mac, wants to insert a couple of small plots
(each with several lines) in an article, but he has to reduce plots'
size significantly. He did it (in pdf or enc. ps) but, unfortunately,
everything is reduced but lines' width. Besides, 'lwd' argument in par()
or plot() can't be less than one.
I am not a Mac user and I don't know
2004 Sep 22
1
layout for xyplot
Dear all,
I tried to use layout argument in xyplot to get one panel per page.
I have a dataframe named 'data' with the following variables:
x, y = coords,
sub, bloc = 2-level factors,
etat = 5-level factor,
I did :
> lset(theme = col.whitebg())
> xyplot(y ~ x | bloc*sub , data=data, groups=etat,
+ layout=c(0,1,4),
+ main="Etat des plantes dans chaque
2005 Jul 07
1
About ade4 and overlaying points
Dear R-users,
Is there an easy way to avoid points one upon another when ploting rows
and columns of 'dudi' objects ? Maybe there is a function in ade4 or in
an other package, or maybe someone has his or her own function to do
this (for example to automatically modify a little the coordinates of
these points to get a readable plot ?).
Thanks in advance.
Best regards,
Jacques VESLOT
2017 Aug 26
2
DC Upgrade from 4.1.7 to 4.6.7
> -----Message d'origine-----
> De : Andrew Bartlett [mailto:abartlet at samba.org]
> Envoyé : samedi 26 août 2017 12:40
> À : HB; samba at lists.samba.org
> Objet : Re: [Samba] DC Upgrade from 4.1.7 to 4.6.7
>
> On Sat, 2017-08-26 at 12:32 +0400, HB via samba wrote:
> > >
> > Here is the output of samba-tool dbcheck :
> > # samba-tool dbcheck
>
2007 May 21
1
Comparing multiple distributions
Hello eveybody,
I am studying the vertical distribution of plankton and want to study
its variations relatively to several factors (time of day, species,
water column structure etc.). So my data is special in that, at each
sampling site (each observation), I don't have *one* number, I have
*several* numbers (abundance of organisms in each depth bin, I sample
5 depth bins) which
2005 Oct 27
2
F tests for random effect models
Dear R-users,
My question is how to get right F tests for random effects in random effect models (I hope this
question has not been answered too many times yet - I didn't find an answer in rhelp archives).
My data are in mca2 (enc.) :
names(mca2)
[1] "Lignee" "Pollinisateur" "Rendement"
dim(mca2)
[1] 100 3
replications(Rendement ~ Lignee *
2017 Aug 26
2
DC Upgrade from 4.1.7 to 4.6.7
> -----Message d'origine-----
> De : samba [mailto:samba-bounces at lists.samba.org] De la part de Rowland
> Penny via samba
> Envoyé : samedi 26 août 2017 12:00
> À : samba at lists.samba.org
> Objet : Re: [Samba] DC Upgrade from 4.1.7 to 4.6.7
>
...
> On Sat, 26 Aug 2017 11:28:00 +0400
> > Hi,
> >
> > I have begun to add a new 4.6.7 DC (following
2006 Sep 26
2
Vectorise a for loop?
Hi R guru coders
I wrote a bit of code to add a new column onto a "topTable" dataframe.
That is a list of genes processed using the limma package. I used a for
loop but I kept feeling there was a better way using a more vector
oriented approach. I looked at several commands such as "apply", "by"
etc but could not find a good way to do it. I have this feeling there
2008 Dec 16
8
sliding window over a large vector
Hi all,
I have a very large binary vector, I wish to calculate the number of
1's over sliding windows.
this is my very slow function
slide<-function(seq,window){
n<-length(seq)-window
tot<-c()
tot[1]<-sum(seq[1:window])
for (i in 2:n) {
tot[i]<- tot[i-1]-seq[i-1]+seq[i]
}
return(tot)
}
this works well for for reasonably sized vectors. Does
2004 Sep 09
1
Indexing dataframe
I am sorry to ask such question, but I can't find a solution...
I have a dataframe 'd2004' and I want to remove two columns:
'd2004$concentration' and 'd2004$stade".
I could do it just as follows:
> names(d2004)
[1] "Localite" "Date" "parcelle" "maille"
"presence.plant"
2006 Nov 24
1
Error Message saying .Call("R_lazyLoadDBfetch", etc.
Hi,
I got the following error message when running a function of mine doing intensive computations:
Erreur dans .Call("R_lazyLoadDBfetch", key, file, compressed, hook, PACKAGE = "base") :
r?f?rence d'argument par d?faut r?cursive
I haven't found neither where the problem lies nor what could be recursive.
Besides, I wonder whether it might or not be a problem
2005 Oct 28
2
Random effect models
Dear R-users,
Sorry for reposting. I put it in another way :
I want to test random effects in this random effect model :
Rendement ~ Pollinisateur (random) + Lignee (random) + Pollinisateur:Lignee (random)
Of course :
summary(aov(Rendement ~ Pollinisateur * Lignee, data = mca2))
gives wrong tests for random effects.
But :
summary(aov1 <- aov(Rendement ~ Error(Pollinisateur * Lignee), data =
2008 Dec 24
2
Using 'cat' on data frame
Dear all,
I have the following data frame:
> raw.count
Var1
Freq
1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 707
2 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC 14
3 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT 3
But why when printint it using 'cat', it doesn't print
the desired string "AAA" ?
> cat(raw.count$Var1,
2006 Aug 30
4
Barplot
Dear all,
I have a dataset. I want to make barplot from this data.
Zero1 <- "
V1 V2 V3 V4 V5 V6 V7 V8 V9
1 1 0 0 0 1 0 0 0 Positive
2 0 0 1 0 1 0 1 1 Negative
3 0 0 1 0 0 0 1 1 Positive
4 0 1 0 1 1 1 0 1 Negative
5 0 0 1 0 1 1 0 0 Positive
6 0 1 0 0 1 1 1 1 Negative
7 1 0 1 1 1 1 1 1 Negative
8 0 0 0 0 1 0 0 1