Re: [R] table and unique seems to behave differently

2019-12-10 Thread Alain Guillet
Thanks a lot, it answers my question. Alain De : Jeff Newmiller Envoy� : mardi 10 d�cembre 2019 16:31 � : r-help@r-project.org ; Duncan Murdoch ; Alain Guillet ; r-help@r-project.org Objet : Re: [R] table and unique seems to behave differently I think the

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Alain Guillet
Another finding for me today: dput doesn't write exactly the vector that creates the problem. I could use an RData file but I think it is forbidden in this mailing list... Alain De : Chris Evans Envoy� : mardi 10 d�cembre 2019 15:41 � : Alain Guillet C

[R] table and unique seems to behave differently

2019-12-10 Thread Alain Guillet
output which contains "3.4 3.4", table has only one cell for 3.4. Can anybody know why I get results that look like incoherent between the two functions? Best regards, Alain Guillet -- platform x86_64-pc-linux-gnu arch

Re: [R] Aggregate behaviour inconsistent (?) when FUN=table

2018-02-06 Thread Alain Guillet
utput , use str() instead of print(). Bill Dunlap TIBCO Software wdunlap tibco.com <http://tibco.com> On Tue, Feb 6, 2018 at 12:20 AM, Alain Guillet mailto:alain.guil...@uclouvain.be>> wrote: Dear R users, When I use aggregate with table as FUN, I get what I would call a

[R] Aggregate behaviour inconsistent (?) when FUN=table

2018-02-06 Thread Alain Guillet
ce the result is not completely compatible with the expectation of result we can have according to the table help? Or would it be possible to have the same results independently of the vector type? This post was rejected on the R-devel mailing list so I ask my question here as suggeste

Re: [R] using read.csv2()

2016-09-29 Thread Alain Guillet
ww.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. . -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain http://www.uclouvain.be/smcs Bureau c.316 Voie du Roman Pays, 20 (bte L1.0

Re: [R] Upgrade R 3.2 to 3.3 using tar.gz file on Ubuntu 16.04

2016-09-14 Thread Alain Guillet
__ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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-contained, reproducible code. . -- Alain Guillet Statistician and

[R] ggplot2 - unexpected beahviour with facet_grid

2016-08-04 Thread Alain Guillet
e (and not attached): [1] Rcpp_0.12.5 lattice_0.20-33 digest_0.6.9 MASS_7.3-45 grid_3.3.1 [6] plyr_1.8.4 nlme_3.1-128 gtable_0.2.0 magrittr_1.5 scales_0.4.0 [11] stringi_1.1.1reshape2_1.4.1 Matrix_1.2-6 labeling_0.3 tools_3.3.1 [16] stringr_1.0.0munsell_0.4.3

Re: [R] rename columns with pattern

2015-01-12 Thread Alain Guillet
", "data.frame")) > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provi

Re: [R] Remove levels

2013-06-13 Thread Alain Guillet
Hi, Without more information I guess your problem is that the level name still exists in the factor whereas it doesn't appear anymore in the factor. If so, try droplevels. Alain Guillet On 13/06/13 14:02, Shane Carey wrote: > I have a dataframe consisting of factors in one column. I

Re: [R] Introduction to R. Any such documentation in Vietnamese?

2013-03-20 Thread Alain Guillet
There is a contributed section on the http://cran.r-project.org/. Go to it, there is a vietnamese document to introduce R. Alain Guillet On 20/03/2013 02:06, Peter Alspach wrote: > Dear fellow users > > Are there any Vietnamese language resources for beginners of R? If so, I &

Re: [R] adding an ellipse to a PCA plot

2011-06-06 Thread Alain Guillet
ds, Lukas __ 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-contained, reproducible code. -- Alain Guillet St

Re: [R] How to arrange the data

2010-12-17 Thread Alain Guillet
nfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain http://www.uclouvain.be/smcs Bureau c.3

Re: [R] Increase R precision

2010-10-27 Thread Alain Guillet
*From:* Alain Guillet *To:* Alaios *Cc:* Rhelp *Sent:* Wed, October 27, 2010 1:58:46 PM *Subject:* Re: [R] Increase R precision Hi, It is not a problem of precision but a problem of display. > options(digits=15) > (18-46)/(45-

Re: [R] Increase R precision

2010-10-27 Thread Alain Guillet
eleted]] __ 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-contained, reproducible code. -- Alain Guillet Statistician and Computer Sci

Re: [R] MATLAB vrs. R

2010-10-11 Thread Alain Guillet
ad the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20

Re: [R] Kolmogorov Smirnov p-values

2010-09-02 Thread Alain Guillet
Hi, Are you sure you don't want to do ks.test(y, punif, min=0, max=1, alternative="greater") instead of what you tried? Alain On 02-Sep-10 15:52, Samsiddhi Bhattacharjee wrote: ks.test(y, runif, min=0, max=1, alternative="greater") -- Alain Guillet Statistici

Re: [R] Determining the length of unique items in a vector

2010-08-20 Thread Alain Guillet
r answers gave you > something really different; I might have wrongly understood your question. > > HTH, > Ivan > > Le 8/20/2010 12:32, Alain Guillet a écrit : >> Hi, >> >> You can try sapply(levels(as.factor(dat1)),nchar) >> >> Alain >> >&g

Re: [R] Determining the length of unique items in a vector

2010-08-20 Thread Alain Guillet
ow the length of replications for each unique items viz "asd", "xyz", and "erd". Is there any R function available to directly implement that? Thanks, [[alternative HTML version deleted]] __ R-help@r-p

Re: [R] Where the data file is stored?

2010-08-12 Thread Alain Guillet
lman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman Pa

Re: [R] Difference Between R: wilcox.test and STATA: signrank

2010-08-09 Thread Alain Guillet
lot in advance! [[alternative HTML version deleted]] __ 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-contai

Re: [R] save plot

2010-08-04 Thread Alain Guillet
/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Lou

Re: [R] Substring of a character column

2010-08-04 Thread Alain Guillet
ied it with substr() but due to the different length and no wildcard allowance it did not work. Would be glad for any help! Thanks in advance. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Louvain

Re: [R] Concatenate a mix of numbers and letters to create a vector name

2010-07-26 Thread Alain Guillet
at.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-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316

Re: [R] Plot of a subset of a data.frame()

2010-07-26 Thread Alain Guillet
subsets e.2 = subset(e, b=="b") plot(d~a, e.1, pch=3, col=2) points(d~a, e.2, pch=4, col=3) ~~ The plot-command produces horizontal lines instead of dots. This seems to happen when the x-axis contains strings rather than numbers. is

Re: [R] how to write legend of a plot

2010-07-22 Thread Alain Guillet
tat.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-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c

Re: [R] par("uin") ?

2010-07-19 Thread Alain Guillet
t(t((rad * qcircr) %*% rot(pi/2)) + c(2 * rad, 0.5 - rad)) bra <- rbind(seg1, seg2, seg3, seg4) if (!right) bra <- bra %*% diag(c(-1, 1)) bra <- scale * bra %*% rot(-alpha) bra <- bra %*% diag(c(1/ux, 1/uy)) bra <- t(t(bra) + c(x1, y1)) bra } -- Alain Gu

Re: [R] a small puzzle?

2010-07-12 Thread Alain Guillet
-1) : the condition has length> 1 and only the first element will be used s [1] -1 length(s) [1] 1 str(news1o) num [1:3588] 891 890 890 888 886 ... str(s2o) num [1:3588] 895 892 890 888 885 ... -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université c

Re: [R] in continuation with the earlier R puzzle

2010-07-12 Thread Alain Guillet
I might as well use C or any other language. The reason R is powerful is becasue it can handle large vectors without each element being manipulated? Please let me know where I am wrong. for(i in 1:length(news1o)){ + if(news1o[i]>s2o[i]) + s[i]<-1 + else + s[i]<--1 + } -- Alain Guil

Re: [R] Problem with the recode function

2010-06-16 Thread Alain Guillet
ox wrote: Dear Alain, -Original Message----- From: Alain Guillet [mailto:alain.guil...@uclouvain.be] Sent: June-15-10 12:25 PM To: John Fox Cc: r-help@r-project.org Subject: Re: [R] Problem with the recode function I found out what the problem is: when I start R Commander, so

Re: [R] Problem with the recode function

2010-06-15 Thread Alain Guillet
tics Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alain Guillet Sent: June-15-10 10:58 AM To: r-help@r-project.org S

[R] Problem with the recode function

2010-06-15 Thread Alain Guillet
able [1] NA NA NA NA NA NA NA NA NA NA I am using R 2.11.1 with Rcmdr 1.5-5 on Windows Vista. Regards, Alain -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Louva

Re: [R] NAs are not allowed in subscripted assignments

2010-04-09 Thread Alain Guillet
Sorry I forgot to add that you don't need the for loop: new[new>5.5] <- NA new [1] 5 5 5 5 NA Alain On 09-Apr-10 11:23, Paul Chatfield wrote: new<-c(rep(5,4),6) for (i in 1:6) {new[new[i]>5.5][i]<-NA} -- Alain Guillet Statistician and Computer Scientist SMCS

Re: [R] terminating function

2010-04-09 Thread Alain Guillet
ng guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium tel: +

Re: [R] NAs are not allowed in subscripted assignments

2010-04-09 Thread Alain Guillet
continue, this should work fine. I'm sure I'm missing a simple solution, but can't seem to see it, Any help, as always, greatly appreciated, Paul -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman

Re: [R] Summing with NA

2010-03-24 Thread Alain Guillet
_ 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-contained, reproducible code. -- Alain Guillet Statistician and Computer Scie

Re: [R] How to sum a list of matrices ?

2010-03-10 Thread Alain Guillet
ailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Université catholique de Louvain Bureau c.316 Voie du Roman Pays

Re: [R] two questions for R beginners

2010-02-26 Thread Alain Guillet
ailing 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-contained, reproducible code. [[alternative HTML version deleted]] __________ R-help@r-project.org mailing list http

Re: [R] How to extract one of four plots in a linear regression model

2010-02-25 Thread Alain Guillet
Hi, You can extract a plot in using the option which in specifying the number of the plot (from 1 to 6). For example: > plot(lm.D9, which=1) Regards, Alain Guillet On 25-Feb-10 16:50, FMH wrote: Dear All, A linear regression model could be fitted by using lm function and the p

Re: [R] how to label individuals with FactoMiner ?

2010-02-24 Thread Alain Guillet
e posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Lou

Re: [R] Simple Function doesn't work?

2009-11-27 Thread Alain Guillet
project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium t

Re: [R] Switch Help

2009-11-18 Thread Alain Guillet
= cat("df:Don't Forget","\n")} ) } I want to be able to do: aar("dx") # function does cat("dx:Diagnosis","\n") aar(c("dx","df")) # function does cat("dx:Diagnosis","\n")

Re: [R] Odp: ^ operator

2009-11-16 Thread Alain Guillet
lman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau c.31

Re: [R] Discriminant plot

2009-10-16 Thread Alain Guillet
eturned by predict. Is not the case with my data, if you compare the original classes with those returned by predict(), the are different. I'm really confused now... Regards, Alejo 2009/10/15, Alain Guillet <mailto:alain.guil...@uclouvain.be>>: Hi Alejo, According to my

Re: [R] Discriminant plot

2009-10-15 Thread Alain Guillet
irst tow discriminant axis. Thanks , Alejo -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium tel: +32 10 47 30 50 ___

Re: [R] plot discriminant analysis

2009-10-14 Thread Alain Guillet
03 G0 26 2 M 40 46 any clues? Regards, __ 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-con

Re: [R] principal component analysis for class variables

2009-08-03 Thread Alain Guillet
pca1 <- dudi.pca(D, scan = FALSE, nf = 2) Error in v * row.w : non-numeric argument to binary operator Does someone has suggestions? Thanks, Andy -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau d.316 Voie du Roman Pa

[R] Batch problem

2009-06-26 Thread Alain Guillet
computer with R-2.9.1 but this problem doesn't appear with R-1.9.1 on the same machine. Is anything wrong in the syntax of my bat file? Thanks. Regards, Alain -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau d.126 Vo

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread Alain Guillet
rote: Hi Alain, I tried levels(myfactor) as you suggested. > levels(myfactor) [1] "IN0020020155" "IN0019800021" "IN0020020064" The order is preserved, no alphanumerical sorting done here. Regards. On Wed, May 6, 2009 at 7:35 PM, Alain Guillet mailto:alain.guil

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread Alain Guillet
? Regards, Chirantan Visit us at http://www.2pirad.com [[alternative HTML version deleted]] __ 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.o

Re: [R] creating a vector of sums

2009-04-28 Thread Alain Guillet
g 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-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université c

Re: [R] Comparing two regression line slopes

2009-04-15 Thread Alain Guillet
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-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist SMCS - Institu

Re: [R] turning list into vector/dataframe

2009-04-10 Thread Alain Guillet
My supervisor said I first had to turn this into a vector but I don't seem to be able to do that! Any ideas on how to turn this list into a dataframe would be really appreciated :) Thanks in advance Melissa -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statis

[R] Is a point into an ellipse

2009-04-08 Thread Alain Guillet
ike to know if (0,1) belongs to the drawn ellipse. Regards, Alain -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau d.126 Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium

Re: [R] R and SPSS

2008-11-27 Thread Alain Guillet
ble way (or just >> ways!) to integrate it in SPSS? >> >> > I would doubt you could do this, but for the least "provide commented, > minimal, self-contained, reproducible code." It would help if you were > more specific. > Liviu > > > > >

Re: [R] Basic question on concatenating factors

2008-11-21 Thread Alain Guillet
generated > > Thanks, > > EC > > ______ > 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, m

Re: [R] Incorrect order

2008-10-29 Thread Alain Guillet
gt; sort(a) [1] 15 20 30 40 > order(a) [1] 3 1 2 4 > rank(a) [1] 2 3 1 4 Alain lll73 wrote: > I am using the order function and the result seems to be incorrect: > > >> a<-c(20,30,15,40) >> order(a) >> > [1] 3 1 2 4 > > Any suggestions?

Re: [R] add labelled contour lines to filled.contour plot

2008-10-01 Thread Alain Guillet
Look at contourplot in the lattice library. There is an example doing what you want. Alain Guillet Mark wrote: Is it possible to add labelled contour lines to filled.contour plot ? [[alternative HTML version deleted]] __ R-help@r

Re: [R] how to set rownames / colnames for matrices in a list

2008-09-22 Thread Alain Guillet
ASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Alain Guillet Statistician and Computer Scientist Institut de statistique - Université catholique de Louvain Bureau d.126 Voie du Roman Pays, 20 B-1348 L