Re: [R] summary of arima model in R

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

Re: [R] File normalization

2010-05-25 Thread Joris Meys
Bert Gunter 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

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

2010-05-25 Thread Joris Meys
mensions. And I 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 Univers

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 wrote: &g

Re: [R] multivariate nonparametric test

2010-05-25 Thread Joris Meys
e 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 pro

Re: [R] File normalization

2010-05-25 Thread Joris Meys
ailing list archive at Nabble.com. > > __ > 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,

Re: [R] R eat my data

2010-05-25 Thread Joris Meys
t; > -- > Sincerely, > Changbin > -- > > Changbin Du > DOE Joint Genome Institute > Bldg 400 Rm 457 > 2800 Mitchell Dr > Walnut Creet, CA 94598 > Phone: 925-927-2856 > >[[alternative HTML version deleted]] > > _

Re: [R] Need Help! Poor performance about randomForest for large data

2010-05-25 Thread Joris Meys
t; > __ > 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.

[R] normalizing branch length with ape or similar

2010-05-24 Thread Joris Meys
ed to make 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 Bioscie

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

2010-05-20 Thread Joris Meys
gt; View this message in context: > http://r.789695.n4.nabble.com/offset-in-gam-and-spatial-scale-of-variables-tp483p2224528.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help &

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

2010-05-19 Thread Joris Meys
ge in context: > http://r.789695.n4.nabble.com/offset-in-gam-and-spatial-scale-of-variables-tp483p976.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mai

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

2010-05-19 Thread Joris Meys
first. 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 wrote: > On Wednesday 19 May 2010 15:29, Joris Meys wrote: > > Could you specify the package you use? If it is

Re: [R] Displaying smooth bases - mgcv package

2010-05-19 Thread Joris Meys
;,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 wrote: >

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

2010-05-19 Thread Joris Meys
om. > > __ > 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, re

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

2010-05-19 Thread Joris Meys
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,

[R] Displaying smooth bases - mgcv package

2010-05-19 Thread Joris Meys
. I'd like to have the basis functions 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 : +3

Re: [R] P values

2010-05-09 Thread Joris Meys
umptions. In that way I can understand what Robert wants to say. But > with > lare enough datasets, bootstrapping or permutation tests gives often about > the same p-value as the asymptotic approximation. *At that moment, the > central limit theorem comes into play* > > > On Sat, M

Re: [R] P values

2010-05-08 Thread Joris Meys
ting 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 proces

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

2010-05-08 Thread Joris Meys
, May 8, 2010 at 4:04 PM, David Winsemius wrote: > > 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

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

2010-05-08 Thread Joris Meys
nt(all.equal(test[[i]],test[[j]])) } } # combn 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 :

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
alue <- mean(abs(med.diff.boot)>=abs(med.diff.observed)) # calculate proportion of test statistic 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, > C

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
e code. >>>> >>>> >>>> Thomas Lumley Assoc. Professor, Biostatistics >>> tlum...@u.washington.eduUniversity of Washington, Seattle >>> >>> >>> >>[[alternative HTML version deleted]] &

Re: [R] help on hmisc

2010-05-07 Thread Joris Meys
ML 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-contained,

Re: [R] median of two groups

2010-05-07 Thread Joris Meys
>> PLEASE do read the posting guide > >> http://www.R-project.org/posting-guide.html > >> and provide commented, minimal, self-contained, reproducible code. > >> > >> > > Thomas Lumley Assoc. Professor, Biostatistics > > tl

Re: [R] help in R

2010-05-07 Thread Joris Meys
[[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-contained,

Re: [R] How to re-arrange data 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. > -- Jo

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
opment, I'd like to hear and I'll try to make it happen.) >> >> Prompted by your Email I have found the R project membership form and >> 'faxed it off with payment and will probably donate some more on top of >> that 25 euros. However, I would love a way to make

Re: [R] glm contrasts

2010-05-07 Thread Joris Meys
raction between them and the above error structure. > > Mnay thanks, > > Natalie > > __ > 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-g

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

2010-05-07 Thread Joris Meys
es.1252 > attached base packages: > [1] stats graphics grDevices utils datasets methods base > other attached packages: > [1] MASS_7.3-4 > > loaded via a namespace (and not attached): > [1] tools_2.10.0 > > __ > R-hel

Re: [R] Rcmdr probs

2010-05-07 Thread Joris Meys
rist, > Michael D > >[[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,

Re: [R] Protecting elements within a function

2010-05-07 Thread Joris Meys
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-contain

Re: [R] help on hmisc

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

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

2010-05-06 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 Engineer

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

2010-05-06 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 Me

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

2010-05-06 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. &

Re: [R] T-test & for loop

2010-05-06 Thread Joris Meys
-- > David > > > >> -- >> Gregory (Greg) L. Snow Ph.D. >> Statistical Data Center >> Intermountain Healthcare >> greg.s...@imail.org >> 801.408.8111 >> >> >> -Original Message- >>> From: r-help-boun...@r-project.o

Re: [R] P values

2010-05-06 Thread Joris Meys
ide http://www.R-project.org/posting- >> > guide.html >> > and provide commented, minimal, self-contained, reproducible code. >> > >> > __ >> > R-help@r-project.org mailing list >> > https://stat.ethz.ch/ma

Re: [R] frequency

2010-05-06 Thread Joris Meys
For completeness. On Thu, May 6, 2010 at 8:03 PM, Joris Meys 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

Re: [R] Intersection list

2010-05-06 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 Statist

Re: [R] Number of cluster

2010-05-06 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 Bi

Re: [R] P values

2010-05-06 Thread Joris Meys
provide commented, minimal, self-contained, reproducible code. > > > > __ > > 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

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 wrote: &

Re: [R] T-test & for loop

2010-05-06 Thread Joris Meys
, reproducible code. > > > > > > -- > Dimitri Liakhovitski > Ninah.com > dimitri.liakhovit...@ninah.com > >[[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz

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

2010-05-06 Thread Joris Meys
; > Contact > Details:--- > Contact me: tal.gal...@gmail.com | 972-52-7275845 > Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | > www.r-statistics.com (English) > >

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

2010-05-06 Thread Joris Meys
<- lm(as.matrix(dat[,-1]) ~ DC, data=dat) > (av.ok <- Anova(mod.ok, idata=idata, idesign=~week)) > > #- R code > > > Thanks in advance, > Tal > > Contact > Details:--- > Contac

Re: [R] Lazy evaluation in function call

2010-05-04 Thread Joris Meys
ting 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 C

Re: [R] timing a function

2010-05-04 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

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

2010-05-04 Thread Joris Meys
t 5:50 PM, jim holtman 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 > >

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

2010-05-04 Thread Joris Meys
hat with an apply, unless there is a very convenient 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 Coupu

Re: [R] Tinn-R

2010-04-26 Thread Joris Meys
rovide commented, minimal, self-contained, reproducible code. > > [[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 > htt

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

2010-04-26 Thread Joris Meys
m. > > __ > 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

[R] use of random and nested factors in lme

2010-04-05 Thread Joris Meys
clear to me 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

Re: [R] Co-occurrence

2010-04-05 Thread Joris Meys
ps://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 Depa

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

2010-04-02 Thread Joris Meys
010 at 12:55 AM, wrote: > Hi Joris > > Try Is.element function: is.element (x,y) > > Regards > mohamed > > Joris Meys a écrit : > > Dear all, >> >> I have a vector, and for each element I want to check whether it is equal >> to >> any eleme

[R] compare multiple values with vector and return vector

2010-04-02 Thread Joris Meys
pretty huge datasets. Anybody an idea? thank you 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 Gen

Re: [R] Create a new variable

2010-03-30 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 Biosci

Re: [R] list index rules evaluation behavior

2010-03-30 Thread Joris Meys
p1745398p1745398.html > Sent from the R help mailing list archive at Nabble.com. > > __ > 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/pos

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

2010-03-30 Thread Joris Meys
ction 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

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 wrote: > > 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 S4 generic also g

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

2010-02-26 Thread Joris Meys
en by ls(). On the other hand, the method "print" does! So when I use rm(list=ls()) I still have the "initialize" and "show" method, but the "print" method is gone. Am I forgetting something somewhere? It's rather inconvenient to have to run the definition fil

[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 figur

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 wrote: > Hello all. I have the following: > > plot(salaries$yearID, salaries$salary, type='n', xaxt='n', xlab='', > yaxt='n', ylab='') > axis(1, at=unique(salaries$yearID),

[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, temper

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 the

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 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 database ("B") onto the

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 wrote: > Hello, > > sorry for incomplete code... > > with this I read the file and calculate my stuff. I have a

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 wrote: > > Sure,but my problem is that the script is run f

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

2009-11-24 Thread joris meys
; On Mon, Nov 16, 2009 at 07:28, joris meys 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.f

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 h

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] 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 wrote: > Dear all, > > I'm looking for a funct

[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 possi

[R] Fwd: dendrogram

2009-11-16 Thread joris meys
I was missing something. Thx Dennis. -- Forwarded message -- From: Dennis Murphy 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, both of which I fo

[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))) TestA

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] 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, O

Re: [R] loop and plot

2009-10-19 Thread joris meys
,3,1,2,3,1),colour=c("a","b","c","c","a","b","b") > )) > kk = function(f) >             { >              ls=as.character(f) >              for (i in length(f)) >              { >              pie(dataset.ta

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 ?la

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 onl

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 wrote: > I would like to combine multiple pairs plots (each one being a matrix of > correlation plots) into a single graphic. I hav

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 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 works well to co

Re: [R] Time Dependent Cox Model

2009-10-14 Thread joris meys
On Wed, Oct 14, 2009 at 9:19 PM, quaildoc 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 > appendix-cox-regre

Re: [R] SPSS long variable names

2009-10-14 Thread joris meys
but is not beautfull and uses > more 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 wrote: >> Hi Orvalho, >> >> question : wher

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 doe

Re: [R] SPSS long variable names

2009-10-14 Thread joris meys
On Wed, Oct 14, 2009 at 2:45 PM, Robert Baer 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 > supporte

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 ,621610

Re: [R] Selecting initial numerals

2009-10-14 Thread joris meys
On Tue, Oct 13, 2009 at 6:48 PM, PDXRugger 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 ,236115 ,811121

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 wrote: > see ?hist > > On Tue, Oct 13, 2009 at 1:06 PM, Dmitry Gospodaryov > wrote: >> Dear

Re: [R] histogram

2009-10-13 Thread joris meys
see ?hist On Tue, Oct 13, 2009 at 1:06 PM, Dmitry Gospodaryov 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 represented na

Re: [R] Function to find prime numbers

2009-10-13 Thread joris meys
On Tue, Oct 13, 2009 at 5:30 PM, Barry Rowlingson wrote: > On Tue, Oct 13, 2009 at 2:41 PM, Thomas Lumley > 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 in the right direction? > >  This almos

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] SPSS long variable names

2009-10-13 Thread joris meys
, 2009 at 4:35 PM, joris meys wrote: > 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. > > Ch

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 wrote:

Re: [R] R commander.

2009-10-12 Thread joris meys
As the error says, you have different row numbers in your variables. The variable $Chromosome has no values. try : ann <- data.frame( ann [-3] ) Cheers Joris On Mon, Oct 12, 2009 at 8:29 AM, Ilyas . wrote: > i have two RData files,,i want to print them to check the format of the > tables in the

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

2009-10-12 Thread joris meys
gards Joris -- Forwarded message ------ From: romunov Date: Mon, Oct 12, 2009 at 3:14 PM Subject: Re: [R] Error: cannot allocate vector of size 1.2 Gb To: joris meys I hope this workspace file attached is what you were looking for. Cheers, Roman On Mon, Oct 12, 2009 at 2:07 PM,

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 w

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

2009-10-12 Thread joris meys
Thank you for the tips as well (R.huge looks promising)! > >> traceback() > 7: vector("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(

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 packa

Re: [R] Display more than one plot

2009-10-10 Thread joris meys
which graph where. It's pretty straight forward. Kind regards Joris On Sun, Oct 11, 2009 at 12:50 AM, joris meys 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 sp

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 <- c

<    1   2   3   4   5   >