Re: [R] File normalization

2010-05-25 Thread Joris Meys
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. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department

Re: [R] multivariate nonparametric test

2010-05-25 Thread Joris Meys
. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e

Re: [R] File normalization

2010-05-25 Thread Joris Meys
My code substracts the median absolute value. If you want to divide by it, the code must be : apply(some_dataset,2,function( x){ x/median(abs(x)) }) Thanks to Peter Langfelder for pointing out my mistake. On Tue, May 25, 2010 at 6:24 PM, Joris Meys jorism...@gmail.com wrote: What kind

[R] Calculation time of isoMDS and the optimal number of dimensions

2010-05-25 Thread Joris Meys
can't think of a formal method to check in a nMDS framework how much dimensions are enough. Anybody an idea? I use metaMDS from the vegan package, although it's not really meant to be used on these data. Cheers Joris -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience

Re: [R] File normalization

2010-05-25 Thread Joris Meys
Gunter gunter.ber...@gene.com wrote: ?scale is specifically written for this. See also ?sweep Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Joris Meys Sent: Tuesday, May

Re: [R] summary of arima model in R

2010-05-25 Thread Joris Meys
commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

Re: [R] File normalization

2010-05-25 Thread Joris Meys
On Tue, 25 May 2010, Joris Meys wrote: Scale is written to do that IF you want to normalize according to the mean and the sd. For any other form of normalization, apply or sweep constructs will have to be used. I couldn't really see a way of using the absolute median value in a sweep

Re: [R] R eat my data

2010-05-25 Thread Joris Meys
http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000

[R] normalizing branch length with ape or similar

2010-05-24 Thread Joris Meys
sure all branch lengths are interpreteable on the same scale. Therefor I want to normalize the branch lengths, but I can't find a function to do that, nor one to clock the tree. Anybody an idea? Cheers Joris -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering

Re: [R] offset in gam and spatial scale of variables

2010-05-20 Thread Joris Meys
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. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering

[R] Displaying smooth bases - mgcv package

2010-05-19 Thread Joris Meys
for s(x1) and s(x2). Cheers Joris -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

Re: [R] offset in gam and spatial scale of variables

2010-05-19 Thread Joris Meys
-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

Re: [R] offset in gam and spatial scale of variables

2010-05-19 Thread Joris Meys
://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. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied

Re: [R] Displaying smooth bases - mgcv package

2010-05-19 Thread Joris Meys
=Basis function,xlab=X,type=l,lwd=2) plot(x1,Z[,2],ylab=Basis function,xlab=X,type=l,lwd=2) plot(x1,Z[,1],ylab=Basis function,xlab=X,type=l,lwd=2) par(op) On Wed, May 19, 2010 at 8:38 PM, Simon Wood s.w...@bath.ac.uk wrote: On Wednesday 19 May 2010 15:08, Joris Meys wrote: Dear all

Re: [R] offset in gam and spatial scale of variables

2010-05-19 Thread Joris Meys
. The models are essentially the same, the shift is mainly in the intercept. But the centering got a bit a reflex. Cheers Joris On Wed, May 19, 2010 at 8:20 PM, Simon Wood s.w...@bath.ac.uk wrote: On Wednesday 19 May 2010 15:29, Joris Meys wrote: Could you specify the package you use

Re: [R] offset in gam and spatial scale of variables

2010-05-19 Thread Joris Meys
. __ 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. -- Joris Meys Statistical Consultant

Re: [R] P values

2010-05-09 Thread Joris Meys
PM, Joris Meys wrote: On Sat, May 8, 2010 at 7:02 PM, Bak Kuss bakk...@gmail.com wrote: Just wondering. The smallest the p-value, the closer to 'reality' (the more accurate) the model is supposed to (not) be (?). How realistic is it to be that (un-) real? That's a common

[R] apply a function on elements of a list two by two

2010-05-08 Thread Joris Meys
doesn't work combn(test,2,all.equal) Cheers Joris -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

Re: [R] apply a function on elements of a list two by two

2010-05-08 Thread Joris Meys
8, 2010 at 4:04 PM, David Winsemius dwinsem...@comcast.netwrote: On May 8, 2010, at 9:43 AM, Joris Meys wrote: Dear all, I want to apply a function to list elements, two by two. I hoped that combn would help me out, but I can't get it to work. A nested for-loop works, but seems highly

Re: [R] P values

2010-05-08 Thread Joris Meys
. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e

Re: [R] help on hmisc

2010-05-07 Thread Joris Meys
-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. -- Joris Meys Statistical Consultant Ghent University Faculty

Re: [R] Protecting elements within a function

2010-05-07 Thread Joris Meys
]] __ 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. -- Joris Meys Statistical Consultant Ghent University

Re: [R] Rcmdr probs

2010-05-07 Thread Joris Meys
-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. -- Joris Meys Statistical Consultant Ghent University Faculty

Re: [R] cannot update polr model if I specify start parameters

2010-05-07 Thread Joris Meys
-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m

Re: [R] glm contrasts

2010-05-07 Thread Joris Meys
__ 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. -- Joris Meys Statistical Consultant Ghent

Re: [R] What is the best way to have R output tables in an MS Word format? (shaping R core)

2010-05-07 Thread Joris Meys
://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. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department

Re: [R] How to re-arrange data in R

2010-05-07 Thread Joris Meys
and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

Re: [R] help in R

2010-05-07 Thread Joris Meys
]] __ 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. -- Joris Meys Statistical Consultant

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links

Re: [R] help on hmisc

2010-05-07 Thread Joris Meys
the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
that is more extreme than the observed pvalue I use the central limit theorem in a way, assuming the distribution of the statistic for the bootstrap sample is symmetric. Best wishes, Cheba 2010/5/7 Joris Meys jorism...@gmail.com depends on how you interprete absolute median difference

Re: [R] How to solve: Error with Anova {car} due to deficient rank ?

2010-05-06 Thread Joris Meys
guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B

Re: [R] How to solve: Error with Anova {car} due to deficient rank ?

2010-05-06 Thread Joris Meys
) | www.r-statistics.com (English) -- On Thu, May 6, 2010 at 2:25 PM, Joris Meys jorism...@gmail.com wrote: Hi Tal, The problem is not the analysis, but the data. You have 2 weeks that only have

Re: [R] T-test for loop

2010-05-06 Thread Joris Meys
. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e

Re: [R] T-test for loop

2010-05-06 Thread Joris Meys
PS : level, you might want to consider stopping to spam the help-list. You're not making yourself popular by asking -in one day- 3 questions that can be solved by using Google and reading the introductions given on the R homepage. On Thu, May 6, 2010 at 5:57 PM, Joris Meys jorism...@gmail.com

Re: [R] P values

2010-05-06 Thread Joris Meys
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59

Re: [R] Number of cluster

2010-05-06 Thread Joris Meys
/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59

Re: [R] Intersection list

2010-05-06 Thread Joris Meys
-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. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience

Re: [R] frequency

2010-05-06 Thread Joris Meys
For completeness. On Thu, May 6, 2010 at 8:03 PM, Joris Meys jorism...@gmail.com wrote: Table - matrix(ncol=3,nrow=4,c(0,0,0,0,7,2,1,3,4,0,3,4)) # one way t(t(Table)/colSums(Table)) # another way apply(Table,2,function(x){x/sum(x)}) Take in mind that your solution is wrong. If you

Re: [R] P values

2010-05-06 Thread Joris Meys
the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control

Re: [R] T-test for loop

2010-05-06 Thread Joris Meys
[mailto:r-help-boun...@r- project.org] On Behalf Of Joris Meys Sent: Thursday, May 06, 2010 9:57 AM To: Dimitri Liakhovitski Cc: r-help@r-project.org; level Subject: Re: [R] T-test for loop Hehe, those homeworks. If you can explain this code to the professor, you surely passed. n

Re: [R] Polygon Shading Based on Relative Line Position

2010-05-06 Thread Joris Meys
-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics

Re: [R] how to get components / factors in factanal / princomp not loadings

2010-05-06 Thread Joris Meys
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9

Re: [R] how to extract from obj. created by plot function stressplot without printing plot?

2010-05-06 Thread Joris Meys
and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

[R] Avoiding for-loop for splitting vector into subvectors based on positions

2010-05-04 Thread Joris Meys
way of splitting my vector in a list of the subvectors or so. Anybody an idea? Cheers -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87

Re: [R] Avoiding for-loop for splitting vector into subvectors based on positions

2010-05-04 Thread Joris Meys
PM, jim holtman jholt...@gmail.com wrote: Try this: x - 1:10 pos - c(1,4,7) pat - rep(seq_along(pos), times=diff(c(pos, length(x) + 1))) split(x, pat) $`1` [1] 1 2 3 $`2` [1] 4 5 6 $`3` [1] 7 8 9 10 On Tue, May 4, 2010 at 11:29 AM, Joris Meys jorism...@gmail.com wrote: Dear

Re: [R] timing a function

2010-05-04 Thread Joris Meys
-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m

Re: [R] Lazy evaluation in function call

2010-05-04 Thread Joris Meys
, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http

Re: [R] Error in pf(q, df1, df2, lower.tail, log.p) : Non-numeric argument to mathematical function

2010-04-26 Thread Joris Meys
and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m

Re: [R] Tinn-R

2010-04-26 Thread Joris Meys
://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel

Re: [R] Co-occurrence

2010-04-05 Thread Joris Meys
and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

[R] use of random and nested factors in lme

2010-04-05 Thread Joris Meys
on this subject. What confuses me most, is the use of the intercept in the random factor. Does this mean the intercept is seen as random, has a random component or is it just notation? In different mails from this list I found different explanations. Thank you in advance. Cheers Joris -- Joris Meys

[R] compare multiple values with vector and return vector

2010-04-02 Thread Joris Meys
in advance. Cheers Joris -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer

Re: [R] compare multiple values with vector and return vector

2010-04-02 Thread Joris Meys
, mohamed.laj...@inserm.fr wrote: Hi Joris Try Is.element function: is.element (x,y) Regards mohamed Joris Meys jorism...@gmail.com a écrit : Dear all, I have a vector, and for each element I want to check whether it is equal to any element from another vector. I want a vector of logical

[R] weighted.median function from package R.basic

2010-03-30 Thread Joris Meys
in the package limma too, but I didn't use that before. Anybody who knows what happened to R.basic? Cheers Joris -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000

Re: [R] list index rules evaluation behavior

2010-03-30 Thread Joris Meys
-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. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience

Re: [R] Create a new variable

2010-03-30 Thread Joris Meys
-contained, reproducible code. -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : +32 9 264 59 87 joris.m...@ugent.be

Re: [R] New methods for generic functions show and print : some visible with ls(), some not

2010-02-27 Thread Joris Meys
Thank you both for your answers. On Fri, Feb 26, 2010 at 7:58 PM, Duncan Murdoch murd...@stats.uwo.cawrote: You aren't seeing the print method, you are seeing a newly created print generic function. As Uwe mentioned, print() is not an S4 generic, so when you create your print method, a new

[R] New methods for generic functions show and print : some visible with ls(), some not

2010-02-26 Thread Joris Meys
, but the print method is gone. Am I forgetting something somewhere? It's rather inconvenient to have to run the definition files every time I want to clear the memory. Cheers Joris -- Joris Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied

[R] metafor: using mixed models

2010-01-04 Thread Joris Meys
Dear all, I'm currently applying a mixed model approach to meta analysis using the package metafor. I use the model.matrix() function to create dummy variables. The option btt gives me the combined test for the dummies. Problem is, I don't know which indices I have to use, and can't really figure

Re: [R] R help with princomp and pam clustering

2009-12-03 Thread Joris Meys
Hi Tyler, sorry, I missed your response. Don't know if it's solved already, but some remarks. the predict uses a princomp object, so your second command should work. I guess the problem is either the data format of B (should contain exactly the same amount of columns, with the same names), or

[R] S4 Classes, nested objects and references

2009-12-03 Thread Joris Meys
Hi all, I'm currently programming my first complete package in S4. (thanks to Christophe Genolini for the nice introduction he wrote). I have an object Data with a number of slots. One of those slots is meteo. Now Meteo is on itself a class with again a number of slots (like rainfall,

Re: [R] Formatting of numbers on y axis

2009-12-03 Thread Joris Meys
The problem is easily solved by plotting salaries$salary/100 Cheers Joris On Thu, Dec 3, 2009 at 5:16 PM, Wells Oliver we...@submute.net wrote: Hello all. I have the following: plot(salaries$yearID, salaries$salary, type='n', xaxt='n', xlab='', yaxt='n', ylab='') axis(1,

Re: [R] Arrhenius Plot 2 with lattice

2009-11-26 Thread joris meys
Please provide minimal and self-contained code. Without being able to read in the dataset, it's impossible to check the code. Cheers Joris On Thu, Nov 26, 2009 at 9:13 AM, Markus Häge markus_ha...@gmx.de wrote: Hello, sorry for incomplete code... with this I read the file and calculate my

Re: [R] R help with princomp and pam clustering

2009-11-26 Thread joris meys
On Thu, Nov 26, 2009 at 1:04 AM, Tyler82 procaccianti.clau...@gmail.com wrote: Hi all! I am working with R package cluster and I have a little problem: let's say I have two datasets...first one (A) is divided into 4 clusters by means of Pam algorythm. Let's say I want to project the second

Re: [R] Re adline()

2009-11-25 Thread joris meys
I run your script from the windows console (evidently), and as said, I can't reproduce your error. Can you give me the exact command you use to run it from the windows console? Cheers Joris On Tue, Nov 24, 2009 at 7:33 PM, yonosoyelmejor yonosoyelme...@hotmail.com wrote: Sure,but my problem is

Re: [R] Help: Beanplots calculating wrong average

2009-11-24 Thread joris meys
Hi, The log of the mean is not the same as the mean of the logs, that's a no-brainer. Guess you use the beanplot from the package with the same name. beanplot(As1988,log=) gives the correct plot. Next time, could you provide a minimal code example we can run ourselves? If we don't know what

Re: [R] Re adline()

2009-11-24 Thread joris meys
I can't reproduce the error you have. With me, it runs all fine. In fact, readline apparently flushes automatically, as I didn't have to use the flush.console() at all. test.r --- cat(1- 24horas\n) cat(2- 12horas\n) cat(3- 8horas\n) selection-readline(prompt=\nSelecciona numero de horas:)

Re: [R] Labels in horizontal dendrogram not placed correctly?

2009-11-24 Thread joris meys
wrote: On Mon, Nov 16, 2009 at 07:28, joris meys jorism...@gmail.com wrote: Hi all, I tried plotting a horizontal dendrogram, but it seems as if the labels are not taken into account in the function plot.dendrogram(). A minimal example : Test - data.frame(    x1x = c(1:10),    x2x

[R] categorisation of continuous variables in R

2009-11-23 Thread joris meys
Dear all, I'm looking for a function comparable to switch, to categorize a continuous variable in a few levels. Off course that can be done with a series of ifelse statements, but that looks rather clumsy. I looked at switch, but couldn't figure out how to use it for this. I guess that's not

Re: [R] categorisation of continuous variables in R

2009-11-23 Thread joris meys
Never mind, found the function : cut(test,breaks=c(0,10,50,90,100),labels=c(lowest,low,high,highest),include.lowest=T,right=F) Cheers Joris On Mon, Nov 23, 2009 at 2:14 PM, joris meys jorism...@gmail.com wrote: Dear all, I'm looking for a function comparable to switch, to categorize

[R] Labels in horizontal dendrogram not placed correctly?

2009-11-16 Thread joris meys
Hi all, I tried plotting a horizontal dendrogram, but it seems as if the labels are not taken into account in the function plot.dendrogram(). A minimal example : Test - data.frame( x1x = c(1:10), x2x = c(2:11), x3x = c(11:2) ) TestDist - daisy(data.frame(t(Test)))

[R] Fwd: dendrogram

2009-11-16 Thread joris meys
I was missing something. Thx Dennis. -- Forwarded message -- From: Dennis Murphy djmu...@gmail.com Date: Tue, Nov 17, 2009 at 12:34 AM Subject: Re: dendrogram To: jorism...@gmail.com Hi, There are a couple of things you could do to pull the text back into the dendrogram plot,

Re: [R] loop and plot

2009-10-19 Thread joris meys
Hi Rene, the problem is probably due to the fact that R will send all plots to the same graphical output window. Each next plot just replaces the previous one. if it's only a few plots, you can divide the graphical window with the commands par(mfrow=...) (see ?par) or layout(matrix(...)) (see

Re: [R] loop and plot

2009-10-19 Thread joris meys
()              }              } par(mfrow=(3,2)) kk(1:3) Thanks a lot! Rene -Original Message- From: joris meys [mailto:jorism...@gmail.com] Sent: Tuesday, 20 October 2009 12:11 a.m. To: Rene Subject: Re: [R] loop and plot Hi Rene, the problem is probably due to the fact that R will send

Re: [R] Convert data frame entries to numbers

2009-10-19 Thread joris meys
2 problems : test seems to be a data frame or list with one variable. So you have to specify : as.numeric(test$classcol) But this will make the internal factor levels the real values, not the numbers you specified. What you need, is as.numeric(as.character(test$classcol)) Cheers Joris On Mon,

Re: [R] how to get rid of 2 for-loops and optimize runtime

2009-10-19 Thread joris meys
Hi Ian, first of all, take a look at the functions sapply, mapply, lapply, tapply, ... : they are the more efficient way of implementing loops. Second, could you elaborate a bit further on the data set : the amount of the month ago, is that one value from another row, or the sum of all values in

Re: [R] help: combine multiple 'pairs plots'

2009-10-15 Thread joris meys
Don't know if it will work, but did you try ?layout ? Cheers Joris On Thu, Oct 15, 2009 at 2:39 PM, Jesse Poland jap...@cornell.edu wrote: I would like to combine multiple pairs plots (each one being a matrix of correlation plots) into a single graphic. I have tried the par() function, which

Re: [R] help: combine multiple 'pairs plots'

2009-10-15 Thread joris meys
Don't know if it will work, but did you try ?layout ? Otherwise you can take a look at ?split.screen too. Cheers Joris On Thu, Oct 15, 2009 at 2:39 PM, Jesse Poland jap...@cornell.edu wrote: I would like to combine multiple pairs plots (each one being a matrix of correlation plots) into a

Re: [R] Solving an equation in R (and using a loop)

2009-10-15 Thread joris meys
I tried : test - 0:1 test2 - f(0:1) plot(test,test2) plot(test,log(test2)) and test - seq(0,1,by=0.1) test2 - sapply(test,f) plot(test,log(test2)) plot(test,test2) with the values you gave. And according to this result, you did nothing wrong. Zero is the only root of

Re: [R] Selecting initial numerals

2009-10-14 Thread joris meys
On Tue, Oct 13, 2009 at 6:48 PM, PDXRugger j_r...@hotmail.com wrote: II just want to create a new object with the first two numerals of the data. Not sure why this isnt working, consider the following: EmpEst$naics=c(238321, 624410, 484121 ,238911, 81, 531110, 621399, 541613, 524210

Re: [R] Selecting initial numerals

2009-10-14 Thread joris meys
Josh, One way would be to convert the numeric vector to a character and use the function substr(). Following code returns a numeric vector with the 2 first digits of every element. naics=c(238321, 624410, 484121 ,238911, 81, 531110, 621399,541613,524210 ,236115 ,811121 ,236115 ,236115

Re: [R] SPSS long variable names

2009-10-14 Thread joris meys
On Wed, Oct 14, 2009 at 2:45 PM, Robert Baer rb...@atsu.edu wrote: The problem is the limit of 8 characters long on variable names. And again, my answer is that one approach would be to map SHORT names to long variable LABELS.  This was a common use of labels before variable names supported

Re: [R] Time Dependent Cox Model

2009-10-14 Thread joris meys
Well, it might be wise to elaborate a bit more about the variables and what exactly you want e.g. death-time to be. I'd interprete it as time of death, but the fact that it is 0/1, means it is a logical (?) binary variable of some sort. Please ask your question in such a way that somebody who

Re: [R] SPSS long variable names

2009-10-14 Thread joris meys
resources. The great thing would be to support long variables names on read.spss. Thanks guys for everything Caveman On Wed, Oct 14, 2009 at 4:52 PM, joris meys jorism...@gmail.com wrote: Hi Orvalho, question : where do the .dat files come from and what do you have to do with the SPSS syntax

Re: [R] Time Dependent Cox Model

2009-10-14 Thread joris meys
On Wed, Oct 14, 2009 at 9:19 PM, quaildoc just.strut...@gmail.com wrote: Some suggested that go into more detail on what I wanted to accomplish and the rest of my code.  I want to accomplish exactly what Fox did in this article( http://www.nabble.com/file/p25897307/appendix-cox-regression.pdf

Re: [R] SPSS long variable names

2009-10-13 Thread joris meys
Sorry to be so blunt, but I cannot believe PSPP can't save a dataset as a .csv file for example. That should be the prefered format to transport a dataset to any other statistical package, including R. csv files are universal. Cheers Joris On Tue, Oct 13, 2009 at 3:30 PM, Orvalho Augusto

Re: [R] Request Infomation

2009-10-13 Thread joris meys
The easy way out is to send the file containing only the function to the people willing to use it. They can load the function from the file foo.R using : source (path/foo.R) The hard way out is to write a package. For that, see : http://cran.r-project.org/doc/manuals/R-exts.html Cheers Joris

Re: [R] Function to find prime numbers

2009-10-13 Thread joris meys
On Tue, Oct 13, 2009 at 5:30 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Tue, Oct 13, 2009 at 2:41 PM, Thomas Lumley tlum...@u.washington.edu wrote: On Tue, 13 Oct 2009, AJ83 wrote: I need to create a function to find all the prime numbers in an array. Can anyone point me

Re: [R] histogram

2009-10-13 Thread joris meys
see ?hist On Tue, Oct 13, 2009 at 1:06 PM, Dmitry Gospodaryov gospodar...@rambler.ru wrote: Dear R developers,How I can build a histogram from matrix: 0 0.5 1 0.25 34 43 65 1 23 35 54 4 22 29 42 10 21 22 29 20 15 17 20 (first string is represented names of columns, first column is

Re: [R] histogram

2009-10-13 Thread joris meys
On second thought, You'll have to reorganize your data first, and then check the function histogram() in the package lattice. cheers On Wed, Oct 14, 2009 at 12:43 AM, joris meys jorism...@gmail.com wrote: see ?hist On Tue, Oct 13, 2009 at 1:06 PM, Dmitry Gospodaryov gospodar...@rambler.ru

Re: [R] Error: cannot allocate vector of size 1.2 Gb

2009-10-12 Thread joris meys
Dear Roman, could you give us the trace given by traceback() ? I suspect the error is resulting from the permutations and/or jackknife procedure in the underlying functions specaccum and specpool. You can take a look at the package R.huge, but that one is deprecated already. There are other

Re: [R] Error: cannot allocate vector of size 1.2 Gb

2009-10-12 Thread joris meys
(integer, length) 6: integer(nbins) 5: tabulate(bin, pd) 4: as.vector(data) 3: array(tabulate(bin, pd), dims, dimnames = dn) 2: table(y[, factor]) 1: accumcomp(PoCom, y = PoEnv, factor1 = HM_sprem, method = exact) Cheers, Roman On Mon, Oct 12, 2009 at 12:52 PM, joris meys jorism

Re: [R] is that possible to graph 4 dimention plot

2009-10-12 Thread joris meys
I'm basically put off by the question itself. Plotting a 4-dimensional graph is rather complicated if the world has only 3 dimensions. A 4-dimensional representation is typically a movie (with time as the 4th dimension). You could try to project a heatmap on a 3D surface graph, but I doubt this

Re: [R] Error: cannot allocate vector of size 1.2 Gb

2009-10-12 Thread joris meys
allocate vector of size 1.2 Gb To: joris meys jorism...@gmail.com I hope this workspace file attached is what you were looking for. Cheers, Roman On Mon, Oct 12, 2009 at 2:07 PM, joris meys jorism...@gmail.com wrote: It's easier if you just load the data in R, save the workspace and send that one

Re: [R] Display more than one plot

2009-10-10 Thread joris meys
Hi Emkay, If you want to look at different plots together, you can also plot them side by side in the same plot window. You can specify this using for example: par(mfcol=c(2,2)) ( see ?par and check mfrow and mfcol) or layout(matrix(1:4,2,2)) (see ?layout and ?matrix) eg : x -

Re: [R] Display more than one plot

2009-10-10 Thread joris meys
graph where. It's pretty straight forward. Kind regards Joris On Sun, Oct 11, 2009 at 12:50 AM, joris meys jorism...@gmail.com wrote: Hi Emkay, If you want to look at different plots together, you can also plot them side by side in the same plot window. You can specify this using

Re: [R] foreach loop - rejection method

2009-10-08 Thread joris meys
First, you should define your function as : test - function(cand2,phi,lambda, whatever-arguments-you-want-to-use-further){... insert code here ...} All variables you use inside a function only exist within that function. Your parameters/arguments is the interface between the function and the

Re: [R] I can not install DAAG package . help

2009-10-08 Thread joris meys
Quite a strange error. The function installed.packages should be in the utils package. Try ?installed.packages and see if you get a help file. If it doesn't find that function, there is a problem with your R installation. It might be something went wrong with downloading the package itself. DAAG

<    1   2   3   4   5   >