Re: [R] Finding matches in 2 files

2007-07-26 Thread Christophe Pallier
/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] Finding matches in 2 files

2007-07-26 Thread Christophe Pallier
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help

Re: [R] using R for a reaction-time experiment

2007-07-23 Thread Christophe Pallier
the data. Christophe Pallier On 7/23/07, Mike Lawrence [EMAIL PROTECTED] wrote: Psych grad student here, R user for 3 years. Using R for experiments is likely not advisable as it has no fine control of display timing (ex synching stimuli to the screen refresh, etc). On recommendation

Re: [R] Multilevel package: Obtaining significance for waba within-group correlation?

2007-07-23 Thread Christophe Pallier
- gl(2,10) x - rnorm(20) x - tapply(x, group, mean)[group] -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] list

2007-07-18 Thread Christophe Pallier
]] __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http

Re: [R] How to remove the quote in the data frame?

2007-07-14 Thread Christophe Pallier
]] __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org

Re: [R] aov() question

2007-07-12 Thread Christophe Pallier
/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. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted

Re: [R] ANOVA: Does a Between-Subjects Factor belong in the Error Term?

2007-07-10 Thread Christophe Pallier
of a within subject factor 'x' is assessed against the error term subj:x -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] import data

2007-06-30 Thread Christophe Pallier
/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. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted

Re: [R] import data

2007-06-30 Thread Christophe Pallier
Oops, sorry for the previous empty reply. You do not tell us which Operating System you are using, so I assume it must be Windows... You should check the R import/export Data available from the Help/Manuals menu (in French: Aide/Manuels...) Christophe On 6/30/07, Christophe Pallier [EMAIL

Re: [R] Repeat if

2007-06-29 Thread Christophe Pallier
read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help

Re: [R] compare 2 vectors

2007-06-28 Thread Christophe Pallier
On 6/28/07, João Fadista [EMAIL PROTECTED] wrote: I would like to take out the values from one vector that are equal to the values in another vector. Example: a - c(1,2,3,4,5,6,7,8,9) b - c(3,10,20,5,6) b_noRepeats = c(10,20) b[!(b %in% intersect(a,b))] See ?intersect -- Christophe

Re: [R] compare 2 vectors

2007-06-28 Thread Christophe Pallier
setdiff(b,a) is even simpler. On 6/28/07, Christophe Pallier [EMAIL PROTECTED] wrote: On 6/28/07, João Fadista [EMAIL PROTECTED] wrote: I would like to take out the values from one vector that are equal to the values in another vector. Example: a - c(1,2,3,4,5,6,7,8,9) b - c

Re: [R] Repeat if

2007-06-28 Thread Christophe Pallier
/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] using self-written functions

2007-06-28 Thread Christophe Pallier
]] __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier

Re: [R] TukeyHSD

2007-06-28 Thread Christophe Pallier
://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. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted

Re: [R] A really simple data manipulation example

2007-06-27 Thread Christophe Pallier
__ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier

Re: [R] Matlab end operator

2007-06-27 Thread Christophe Pallier
of rows or columns in variables if there are needed more than once. Best, -- Christophe Pallier [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Looking for parallel functionality between Matlab and R

2007-06-26 Thread Christophe Pallier
, to use 'points' or 'lines' to add new elements to the plot. Also, if you want to plot several curves in one shoot, you can use 'matplot'. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help

Re: [R] inter-rater agreement index kappa

2007-06-26 Thread Christophe Pallier
]] __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe

Re: [R] R-excel

2007-06-25 Thread Christophe Pallier
]] __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org

Re: [R] Tools For Preparing Data For Analysis

2007-06-22 Thread Christophe Pallier
10 25 0 10_25 1 2 FALSE 7 10 25 0 10_25 2 2 FALSE 8 10 25 0 10_25 3 2 TRUE My code is not very readable... Yet, the 'trick' of using an helper function like 'cumcount' might be instructive. Christophe Pallier On 6/22/07, Kevin E. Thorpe [EMAIL PROTECTED

Re: [R] add line to data.frame

2007-06-20 Thread Christophe Pallier
',] -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ 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/posting-guide.html

Re: [R] Function -return value

2007-06-19 Thread Christophe Pallier
. __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org

Re: [R] Function -return value

2007-06-19 Thread Christophe Pallier
) Christophe Pallier On 6/19/07, livia [EMAIL PROTECTED] wrote: Hi, I am trying to write a function with the following codes and I would like it to return the values for alpha beta para parab seperately. Then I would like to use this funstion for variable with factor a and b. But the result turns out

Re: [R] what about options in BATCH

2007-06-18 Thread Christophe Pallier
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] BATCH

2007-06-18 Thread Christophe Pallier
]] __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org

Re: [R] data.frame

2007-06-18 Thread Christophe Pallier
-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R

Re: [R] data.frame

2007-06-18 Thread Christophe Pallier
'. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ 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/posting

Re: [R] data.frame

2007-06-18 Thread Christophe Pallier
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help

Re: [R] Read Windows-like .INI files into R data structure?

2007-06-14 Thread Christophe Pallier
back years later, I can follow the exact flow of transformations. Again, make (like awk or R) is not without limits and idiosyncrasies. If someone has a simpler solution, I am interested to hear about it. Christophe -- Christophe Pallier (http://www.pallier.org) [[alternative HTML

Re: [R] Read Windows-like .INI files into R data structure?

2007-06-14 Thread Christophe Pallier
Ah! I forgot to mention that it is possible to call awk from R: a - system(awk -F'=' '/\\[/{a=$1;next}{print $1,$2,a}' example.ini, intern=T) z - textConnection(a) read.table(z) Christophe On 6/14/07, Christophe Pallier [EMAIL PROTECTED] wrote: On 6/14/07, Gabor Grothendieck [EMAIL

Re: [R] Wilcoxon test on data matrix

2007-06-14 Thread Christophe Pallier
. __ 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/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org

Re: [R] how to fit y=m*x

2007-06-14 Thread Christophe Pallier
, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ 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

Re: [R] export to a dat file that SAS can read

2007-06-13 Thread Christophe Pallier
. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ 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/posting-guide.html

Re: [R] Read Windows-like .INI files into R data structure?

2007-06-13 Thread Christophe Pallier
$1 - list(); next } { print listname [' $1 '] - $2 } (I know, it looks cryptic... so I am shooting myself in the foot after claiming that awk scripts are typically quite readable ;-) -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted

Re: [R] Data transformation for chi-square test.

2007-06-12 Thread Christophe Pallier
do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help

Re: [R] Awk and Vilno

2007-06-12 Thread Christophe Pallier
and see what scripts are more elegant (read 'short and understandable') Best, Christophe -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] Tools For Preparing Data For Analysis

2007-06-08 Thread Christophe Pallier
with Awk. With binary formats, it is another story... But, again, this is my limited experience; I would like to know if there are situations where using SAS/SPSS is really a better approach. Christophe Pallier On 6/8/07, Robert Wilkins [EMAIL PROTECTED] wrote: As noted on the R-project web

Re: [R] Tools For Preparing Data For Analysis

2007-06-08 Thread Christophe Pallier
, yet both are tools that one gets attached to because they increase your productivity a lot. -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] test for nested factors

2007-06-04 Thread Christophe Pallier
) == 1) } are.crossed - function (factor1,factor2) { all(table(factor1,factor2) 0 ) } Christophe Pallier www.pallier.org On 6/4/07, Tim Bergsma [EMAIL PROTECTED] wrote: Is there a conventional way to test for nested factors? I.e., if 'a' and 'b' are lists of same-length factors, does

Re: [R] basic problem but can't solve it

2007-05-23 Thread Christophe Pallier
(group)]) Christophe Pallier On 5/22/07, John Kane [EMAIL PROTECTED] wrote: aggregate(Measure, list(Month=Month), mean) --- Benoit Chemineau [EMAIL PROTECTED] wrote: Hello, I have a basic problem but i can't figure it out with the table underneath. I would like to compute monthly

Re: [R] basic problem but can't solve it

2007-05-22 Thread Christophe Pallier
tapply(Measure,Month,mean)[as.character(Month)] -- Christophe Pallier (http://www.pallier.org) On 5/22/07, Benoit Chemineau [EMAIL PROTECTED] wrote: Hello, I have a basic problem but i can't figure it out with the table underneath. I would like to compute monthly averages. I would

Re: [R] Anova Test

2007-05-15 Thread Christophe Pallier
If your data is inside a data.frame names 'a' with data from each group in a different columns,..., you can use stack and perform the anova with: l - aov(values~ind,data=stack(a)) anova(l) Christophe Pallier On 5/15/07, CrazyJoe [EMAIL PROTECTED] wrote: Thank you Guys. Let say that from

Re: [R] Optimized File Reading with R

2007-05-15 Thread Christophe Pallier
') } It can speed up things considerably. Christophe Pallier On 5/15/07, Liaw, Andy [EMAIL PROTECTED] wrote: If it's a matrix, use scan(). If the columns are not all the same type, use the colClasses argument to read.table() to specify their types, instead of leaving it to R to guess

Re: [R] Significance test for discrete data

2007-05-10 Thread Christophe Pallier
The Wilcoxon paired rank sign test assumes symmetry. (cf. http://www.basic.northwestern.edu/statguidefiles/srank_paired_alts.html ) Christophe Pallier On 5/10/07, Alexander Kollmann [EMAIL PROTECTED] wrote: Hello, given situation: - pre / post test comparison of discrete, paired data

Re: [R] hi

2007-05-10 Thread Christophe Pallier
Have you loaded the library containing lda? library(MASS) Christophe Pallier On 5/10/07, elyakhlifi mustapha [EMAIL PROTECTED] wrote: hi, I have this error tr - sample(1:50, 25) train - rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]) test - rbind(iris3[-tr,,1], iris3[-tr,,2], iris3

Re: [R] aov() and lme() (repeated measures and ANOVA)

2005-10-28 Thread Christophe Pallier
are balanced) Christophe Pallier www.pallier.org __ 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/posting-guide.html

Re: [R] r under linux: creating high quality bmp's for win users

2005-03-22 Thread Christophe Pallier
Hello Christoph! In the past, I used an utility called eps2wmf. It only works under Windows though (maybe under Linux with wine?). I believe it is available on the CTAN (Tex archives). The nice thing is that wmf files are not bitmap and scale well. Christophe Pallier Christoph Lehmann wrote: Hi I

Re: [R] contrast matrix for aov

2005-03-10 Thread Christophe Pallier
, Christophe Pallier Let me fake some `data': set.seed(1); roiValues - rnorm(32) subjectlabels - paste(V1:8, sep = ) options(contrasts = c(contr.helmert, contr.poly)) roi.aov - aov(roi ~ Cue*Hemisphere + Error(Subject), data=roiDataframe) roi.aov Call: aov(formula = roi ~ Cue * Hemisphere + Error

Re: [R] Need your help in calculating the p-value

2005-02-23 Thread Christophe Pallier
getAnywhere(wilcox.test.default) ... You will see that it uses 'psignrank' (for the one sample case). Christophe Pallier www.pallier.org __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Reproducing SAS GLM in R

2005-02-22 Thread Christophe Pallier
It seems that you want to do is in a Anova with the within factors factCond and factRoi, right? If this is correct, then you should try: summary(aov(vectdata~factCond*factRoi+Error(factCond*factRoi))) Christophe Pallier www.pallier.org Bela Bauer wrote: Hi, I'm still trying to figure out

Re: [R] type III sum of squares

2004-08-11 Thread Christophe Pallier
this helps. Christophe Pallier http://www.pallier.org __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Re: Enduring LME confusion or Psychologists and Mixed-Effects

2004-08-10 Thread Christophe Pallier
to me that 'lme' is useful when some assumptions of standard anova are violate (e.g. with repeated measurements when the assumption of sphericity is false), or when you have several random factors. Christophe Pallier http://www.pallier.org __ [EMAIL

Re: [R] Aggregate rows to see the number of occurences

2004-06-07 Thread Christophe Pallier
indeed use the 'aggregate' function: aggregate(a[,1],list(a[,1],a[,2]),length) This yields one line per unique value (but that may be what you want...) Christophe Pallier www.pallier.org __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman

Re: [R] Getting the groupmean for each person

2004-05-10 Thread Christophe Pallier
] for a while, (and I am now changing to x-tapply(x,f,mean)[as.character(f)] because of the peculiarities of indexing named vectors with factors ) The use of tapply(x,f,mean)[match(f,unique(f))] assumes a particular order in the result of tapply, no? It seems a bit dangerous to me. Christophe

Re: [R] I have a question!!!! Help me!!

2004-04-20 Thread Christophe Pallier
We want to solve X's and Y's value!! When we have two equation: For example: 2X+3Y=5 X+Y=2 solve(matrix(c(2,1,3,1),2,2),c(5,2)) yields the solution. see '?solve' (you have to know about matrix algebra to understand this function) Christophe Pallier

[R] multistratum glm?

2004-04-18 Thread Christophe Pallier
be treated as fixed-factors in the analysis, would they not? Any suggestion is welcome. Christophe Pallier www.pallier.org __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R

Re: [R] Histogram ploting

2004-04-18 Thread Christophe Pallier
Hello Mateusz, The 'hist' function works on the raw data. In your data set example, you have already computed the number of data points in each bin. What you really want is probably a barplot of N You could display your data: plot(Class,N,'h') Or names(N)-Class barplot(N) Christophe Pallier

Re: [R] applying data generating function

2004-03-07 Thread Christophe Pallier
# starting point for (i in 1:100) { x=f(x); v=append(v,x) } There may be smarter ways... Christophe Pallier __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org

Re: [R] Testing significance in a design with unequal but proportional sample sizes

2004-03-05 Thread Christophe Pallier
the associated MSE). Sorry if the solution is obvious. Christophe Pallier __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] calling R from a shell script and have it display graphics

2004-02-12 Thread Christophe Pallier
to show all the png (or use any other diaporama system). However, I find it a dirty hack. Is there a simpler and cleaner way to achieve this? Christophe Pallier www.pallier.org __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman

RE: [R] density plot for very large dataset

2003-12-15 Thread Christophe Pallier
. However, I have ~30 million data points measurements of each variable. I can read this into R from file and produce a plot with plot(x0, x1) but as you would expect, its not pretty to look at and produces a postscript file of about 700MB. Christophe Pallier http://www.pallier.org

Re: [R] PROC MIXED vs. lme()

2003-12-10 Thread Christophe Pallier
, not random factor. Actually, you do not need lme for to run a repeated measure anova. You could use the aov function: $ summary(aov(DV~GROUP*TRIAL+Error(SUB/TRIAL))) This, again, yields the correct results. Hope this helps, Christophe Pallier http://www.pallier.org

[R] aggregate and names of factors

2003-12-08 Thread Christophe Pallier
) factor.list=lapply(factor.names,eval) names(factor.list)=factor.names aggregate(d[1],factor.list,FUN) } Christophe Pallier http://www.pallier.org --- HEre is the code for aggregate.data.frame that recovers the name sof the factors: my.aggregate.data.frame - function (x, by, FUN