[R] Air Turkey.

2007-08-02 Thread Air Turkey
Sehr geehrte Damen und Herren. Air Turkey ist in Istanbul-Izmir-Antalya ein Spezialveranstalter.www.air-turkey.com Air Turkey spezialisiert für ihre Fluege-Chartermiete,Spezialreisen,Hotels-Gruppenreisen von Kultur und Bildungsreisen.Fuer Vereinen,Sportgruppen,Kirchen. Wir sind spezialisiert

Re: [R] t-distribution

2007-08-02 Thread Stephen Tucker
p - seq(0.001,0.999,,1000) x - qt(p,df=9) y - dt(x,df=9) plot(x,y,type=l) polygon(x=c(x,rev(x)),y=c(y,rep(0,length(y))),col=gray90) Hope this helps. ST --- Nair, Murlidharan T [EMAIL PROTECTED] wrote: Indeed, this is what I wanted, I figured it from the function you and Mark pointed me.

Re: [R] Simple table with frequency variable

2007-08-02 Thread [EMAIL PROTECTED]
I have to compare four different grape varieties proteome in two different years. I don't know what test would be more suitable for my data. I think that an anova two way can be usefull also if someone suggested me to perform a manova. In addiction, I can perform each test on a single protein a

[R] sapply?

2007-08-02 Thread [EMAIL PROTECTED]
I have to compare four different grape varieties proteome in two different years. I don't know what test would be more suitable for my data. I think that an anova two way can be usefull also if someone suggested me to perform a manova. In addiction, I can perform each test on a single protein a

Re: [R] add custom strip to lattice plot

2007-08-02 Thread Patrick Drechsler
Deepayan Sarkar [EMAIL PROTECTED] writes: On 7/30/07, Patrick Drechsler [EMAIL PROTECTED] wrote: what is the recommended way of adding a strip to a lattice plot? See ?strip.default. In the example below I would like to add the value of mean(y) to a new strip.: --8---cut

Re: [R] Simple table with frequency variable

2007-08-02 Thread G. Draisma
Thank you Jim, Sorry, that I was not clear enough. Each case has a frequency variable N. so when tabulating combinations (i,j) they should be weighted with weight N. In this case I would like a command table(i,j,N) resulting in j i 1 2 1 11 12 2 21 22 ... 5 51 52 And I

[R] proportional odds model

2007-08-02 Thread Ramon Martínez Coscollà
Hi all!! I am using a proportinal odds model to study some ordered categorical data. I am trying to predict one ordered categorical variable taking into account only another categorical variable. I am using polr from the R MASS library. It seems to work ok, but I'm still getting familiar and I

[R] proportional odds model in R

2007-08-02 Thread Ramon Martínez Coscollà
Hi all!! I am using a proportinal odds model to study some ordered categorical data. I am trying to predict one ordered categorical variable taking into account only another categorical variable. I am using polr from the R MASS library. It seems to work ok, but I'm still getting familiar and I

[R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Richard M. Heiberger
The messages are visible in 2.6.0dev The same commands in 2.4.1 work without warning messages. I am using the HH_1.18-1 from R_2.4.1 with both R versions and not the current HH_2.1-3 version$version.string installed.packages()[c(grid,lattice, HH),3] ## library(HH) library(lattice,

[R] A combinatorial task. How to get rid of loops

2007-08-02 Thread Serguei Kaniovski
Dear List, I am looking for a faster way of accomplishing this: # n is an integer larger than two n - 3 # matrix of 2^n binary outcomes bmat - as.matrix(expand.grid( rep( list(1:0), n))[, n:1]) # I would like to know which rows of bmat have 1 in the i and j coordinates, so for n=3 in

Re: [R] Simple table with frequency variable

2007-08-02 Thread Johan Lindbäck
Would it be ok with a matrix? i - 1:5; j - 1:2 li - length(i) lj - length(j) A - matrix(numeric(li * lj), nrow = li, dimnames = list(i, j)) for (r in 1:li) for (s in 1:lj) A[r, s] - 10*r + s A HTH /Johan G. Draisma skrev: Thank you Jim, Sorry, that I was not clear enough. Each case

Re: [R] sapply?

2007-08-02 Thread [EMAIL PROTECTED]
I tried to perform a two way anova on my data, but I got this error vitignova-sapply(vitigni.df[,1:length(vitigni)], FUN=function(x) summary(aov(x~vitigni.df$cultivar*vitigni.df$year))[[1]][1,Pr(F)]) Errore in `contrasts-`(`*tmp*`, value = contr.treatment) : i contrasti si possono

Re: [R] Error message in lmer

2007-08-02 Thread lorenz.gygax
I do not think anyone has answered this. I'm trying to run a simple one-way ANCOVA with the lmer function in R package lme4, but have encountered some conceptual problem. The data file MyData.txt is like this: Group Subj Cov Resp A1 3.90 4.05 A 2 4.05 4.25 A 3

Re: [R] A combinatorial task. How to get rid of loops

2007-08-02 Thread Uwe Ligges
Serguei Kaniovski wrote: Dear List, I am looking for a faster way of accomplishing this: # n is an integer larger than two n - 3 # matrix of 2^n binary outcomes bmat - as.matrix(expand.grid( rep( list(1:0), n))[, n:1]) # I would like to know which rows of bmat have 1 in the i and

Re: [R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Uwe Ligges
Richard M. Heiberger wrote: The messages are visible in 2.6.0dev The same commands in 2.4.1 work without warning messages. I am using the HH_1.18-1 from R_2.4.1 with both R versions and not the current HH_2.1-3 version$version.string installed.packages()[c(grid,lattice, HH),3] ##

Re: [R] Using 'diff' on zoo vs zooreg classes (possible bug?)

2007-08-02 Thread Gabor Grothendieck
On 8/2/07, Josh Quigley [EMAIL PROTECTED] wrote: Hello, Can anyone explain the following behaviour? To me it seems a bug, but maybe it is intentional. It seems that a diff on a zooreg class that is not _strictly_ regular only considers those entries that are 'deltat' apart. In the

[R] Finding multiple characters in the same string

2007-08-02 Thread Tom.O
Hi I have this problem where I need to find if there is any numbers in a string, this is no problem if theres only one number per string. I would then simply use the regexpr() funtion togheter with the substring function to exclude the number. But regexpr only picks one number per string either

Re: [R] line widths of plotting symbols in the lattice

2007-08-02 Thread Stephen Tucker
Thanks to all for the response - the grid.points() solution works well. Stephen (oddly I missed when this thread and its response actually got posted... was starting to get worried) --- Deepayan Sarkar [EMAIL PROTECTED] wrote: On 7/31/07, Uwe Ligges [EMAIL PROTECTED] wrote: Stephen

Re: [R] proportional odds model in R

2007-08-02 Thread Michael Dewey
At 08:51 02/08/2007, Ramon Martínez Coscollà wrote: Hi all!! There is no need to post twice, nor to also post on allstat. Pages 204-205 of MASS for which this software is a support tool provides ample information on how to compare models. I am using a proportinal odds model to study some

Re: [R] Finding multiple characters in the same string

2007-08-02 Thread Vladimir Eremeev
gregexpr([0-9],this1is2a3test) [[1]] [1] 5 8 10 attr(,match.length) [1] 1 1 1 unlist(gregexpr([0-9],this1is2a3test)) [1] 5 8 10 Tom.O wrote: I have this problem where I need to find if there is any numbers in a string, this is no problem if theres only one number per string. I would

Re: [R] shadow between two lines in plot()

2007-08-02 Thread Jim Lemon
Ding, Rebecca wrote: Dear R users, I used the following code to draw a scatter plot. plot(x,y,type=n) points(x,y,pch=1) And then I used the abline functions to draw two lines. I want to add the shadow between those two lines. abline(h=200) abline(h=300) Any suggestions? Hi

Re: [R] passing args to R CMD BATCH in win 2000

2007-08-02 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Hello and sorry to bother. Please help. I searched the archives but could not find out why --args is being ignored on Windows 2000. That does not work with R CMD BATCH, AFAIK. In fact, you want to use: Rterm --no-save --args 12 11.R 11.Rout Uwe Ligges I

Re: [R] Finding multiple characters in the same string

2007-08-02 Thread Vladimir Eremeev
grep([0-9],unlist(strsplit(this1is2a3test,)),value=TRUE) Tom.O wrote: I have this problem where I need to find if there is any numbers in a string, this is no problem if theres only one number per string. I would then simply use the regexpr() funtion togheter with the substring function

Re: [R] Finding multiple characters in the same string

2007-08-02 Thread Gabor Grothendieck
Here are a few different approaches: s - this1is2a3test44of extraction tmp - gsub([^[:digit:]], , s) scan(textConnection(tmp), what = 0) tmp - gsub([^[:digit:]], , s) spl - strsplit(tmp, )[[1]] as.numeric(spl[spl != ]) library(gsubfn) strapply(s, [[:digit:]]+, as.numeric)[[1]] On

Re: [R] passing args to R CMD BATCH in win 2000

2007-08-02 Thread Prof Brian Ripley
On Thu, 2 Aug 2007, Uwe Ligges wrote: [EMAIL PROTECTED] wrote: Hello and sorry to bother. Please help. I searched the archives but could not find out why --args is being ignored on Windows 2000. That does not work with R CMD BATCH, AFAIK. In fact, you want to use: Rterm --no-save

Re: [R] Finding multiple characters in the same string

2007-08-02 Thread Tom.O
Thanks for the quick reply //Tom Vladimir Eremeev wrote: gregexpr([0-9],this1is2a3test) [[1]] [1] 5 8 10 attr(,match.length) [1] 1 1 1 unlist(gregexpr([0-9],this1is2a3test)) [1] 5 8 10 Tom.O wrote: I have this problem where I need to find if there is any numbers in a

[R] boxplot hinge customization

2007-08-02 Thread Pietrzykowski, Matthew (GE, Research)
Hello R users wiser than I - I am trying to produce a boxplot with quantiles defined by the type 6 algorithm used mainly by Minitab and SPSS for a comparison study. I found how to compare the results in tabular form using the quantile(x, type = 6) function, but am stuck on how to show the

Re: [R] Multivariable correlation

2007-08-02 Thread Chuck Cleland
John Sorkin wrote: Given a square matrix of variables X, is there any way to compute a multivariable correlation among all the variables in the array? It is possible to calculate the correlation of all pairs of variables in the array, but I want to know the correlation of all the variables

Re: [R] proportional odds model

2007-08-02 Thread Frank E Harrell Jr
Ramon Martínez Coscollà wrote: Hi all!! I am using a proportinal odds model to study some ordered categorical data. I am trying to predict one ordered categorical variable taking into account only another categorical variable. I am using polr from the R MASS library. It seems to work ok,

[R] New user help with plot.default

2007-08-02 Thread PaulGaskell
Hi - I'm just starting out with R and have come up against a problem with what should be a simple operation. I'm plotting a range of safety standards for 7 different chemicals. I don't want the standard box and whisker plot - I just a dot for each value. Whilst using plot.default I get the error

[R] beamer error with R

2007-08-02 Thread Mario Alfonso Morales Rivera
Dear R users, When I use beamer with \usepackage{harvard} it don't work. \LaTeX{} give mi an error message, ¿any suggestion? ! LaTeX Error: No counter 'paragraph' defined. See the LaTeX manual or LaTeX Companion for explanation. Type H return for immediate help. ... l.741

Re: [R] aggregate.data.frame - prevent conversion to factors? show statistics for NA values of by variable?

2007-08-02 Thread Thomas Pujol
I tried setting exclude = . I'm not sure, but to me, it did not seem to work as expected. But i did have success with exclude = NULL. (I'm using R 2.4.1) mydata=c(33,22,44,NA,33,22,NA) myfactor.try1 = factor(mydata, exclude=) myfactor.try2 = factor(mydata, exclude=NULL)

[R] lasso/lars error

2007-08-02 Thread Jake Michaelson
I'm having the exact problem outlined in a previous post from 2005 - unfortunately the post was never answered: http://tolstoy.newcastle.edu.au/R/help/05/10/15055.html When running: lm2=lars(x2,y,type=lasso,use.Gram=F) I get an error: Error in if (zmin gamhat) { : missing value where

Re: [R] Simple table with frequency variable

2007-08-02 Thread G. Draisma
Thanks Johan, I realize that I did not use the right example. I have a table with two factors, say b and c, and a third case weight variable, say w. Then I would like the table command to sum the weights w for each combination of i and j. For instance, with b - rbinom(10,6,0.3) c -

Re: [R] New user help with plot.default

2007-08-02 Thread PaulGaskell
I've replied to your email but essentially I just have a problem with the last line below, the at and labels arguments are different lengths. Also the top edge of the ylabel letters are cut off by the left hand side of the plot frame. John Kane-2 wrote: # Draw the specific axes. axis(1,

Re: [R] warning messages in grid or lattice give that I can't debug

2007-08-02 Thread Richard M. Heiberger
Uwe Ligges wrote: It is essential not to use a lattice version designed for R-2.4.1 with R-devel... And I don't see a reason, and in some cases, switching to another major version of R requires recompiling of packages anyway. The warnings first appeared in 2.6.0dev when I recompiled my

Re: [R] beamer error with R

2007-08-02 Thread Uwe Ligges
Mario Alfonso Morales Rivera wrote: Dear R users, When I use beamer with \usepackage{harvard} it don't work. Why is this related to R? I do not see any connections here. Uwe Ligges \LaTeX{} give mi an error message, ¿any suggestion? ! LaTeX Error: No counter 'paragraph' defined.

Re: [R] New user help with plot.default

2007-08-02 Thread John Kane
Hi Paul, I think one of the problems is that xlim is expecting a numerical vector something like c(1:8) implying a contiuous variable and yours is categorical. I have made quite few changes but does this do what you want? It may not be the most effient but it runs :)

Re: [R] boxplot hinge customization

2007-08-02 Thread Greg Snow
?bxp -Original Message- From: Pietrzykowski, Matthew (GE, Research) [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch r-help@stat.math.ethz.ch Sent: 8/2/07 6:04 AM Subject: [R] boxplot hinge customization Hello R users wiser than I - I am trying to produce a boxplot with quantiles defined

Re: [R] Error message in lmer

2007-08-02 Thread Gang Chen
Thanks a lot for the response and explanation, Lorenz! It seems that I can run the analysis with 'lm' without treating subject as a random factor lm(Resp ~ Group*Cov, TestData) Thanks, Gang On Aug 2, 2007, at 5:09 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I do not think anyone has

[R] Multivariable correlation

2007-08-02 Thread John Sorkin
Given a square matrix of variables X, is there any way to compute a multivariable correlation among all the variables in the array? It is possible to calculate the correlation of all pairs of variables in the array, but I want to know the correlation of all the variables taken together, i.e.

Re: [R] t-distribution

2007-08-02 Thread Nair, Murlidharan T
How do I tell it to shade a particular region below the curve? Like the one being computed below ta - pt(-1.11, 9) + pt(1.11, 9, lower.tail = FALSE) Thanks ../Murli -Original Message- From: Stephen Tucker [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 2:27 AM To: Nair,

Re: [R] New user help with plot.default

2007-08-02 Thread John Kane
If I understand the problem then I think that this was a mistake on my part. I had it working and then made a stupid change. Try axis(2, at=0:3, labels=c(0,1,2,3)) # and to make it look pretty box()

[R] Xyplot - adding model lines to plotted points

2007-08-02 Thread Sandeman, L. R.
Hello, I have written code to plot an xyplot as follows: library(lattice) xyplot(len~ageJan1|as.factor(cohort),groups=sex,as.table=T,strip=strip.c ustom(bg='white',fg='white'),data=dat, xlab=Age (January 1st),ylab=Length (cm),main=Linear models for male and female cod, by cohort,type='p',

Re: [R] Q: obtaining non-transparent background in png

2007-08-02 Thread D. R. Evans
Prof Brian Ripley said the following at 07/31/2007 12:20 PM : You are *copying* the plot, and that means copying the background too (it *is* part of the plot). Almost certainly the plot you are copying had a transparent background: that is the default for X11. All the confusion seems to be

[R] lmer problem

2007-08-02 Thread Yunjeong Hong
Dear all, Here's my question about lmer. this function is very weird because it depends on the data set to work. sometimes it works, other times does not work. I attach the data file and the codes are below that I tried to make it work. Please let me know what the problem is and how to solve

[R] Estimate parameters of copulas

2007-08-02 Thread Michael Sun
Dear list, Does anyone have any experience on how to estimate the parameters of the specific copula in R or S+?? For example, calculate the conditional d. f. of F(x2|x1) by using the partial derivatives of the Clayton copula, C(u1|u2)=((u2^(-alpha) +u1^(-alpha) - 1 )/ u2^(-alpha) )^-1/alpha-1

Re: [R] New user help with plot.default

2007-08-02 Thread PaulGaskell
N.B. Margin settings of mar=c(5, 5, 4, 2) + 0.1 were perfect for version 2.5.0 John Kane-2 wrote: If I understand the problem then I think that this was a mistake on my part. I had it working and then made a stupid change. Try axis(2,

Re: [R] constrOptim

2007-08-02 Thread Thomas Lumley
On Wed, 1 Aug 2007, Joanne Lee wrote: The constraints on the optimization problem are: 1 - components of potentialargmin must add to 1. 2 - each potentialargmin component must be (weakly) positive and (weakly) less than 1. 3 - potentialargmin %*% c(1,2,3,4,5,6,7,8,9) = 4.5 constrOptim() is

[R] simulate() and glm fits

2007-08-02 Thread William Valdar
Dear All, I have been trying to simulate data from a fitted glm using the simulate() function (version details at the bottom). This works for lm() fits and even for lmer() fits (in lme4). However, for glm() fits its output does not make sense to me -- am I missing something or is this a bug?

[R] [R-pkgs] new package plotAndPlayGTK

2007-08-02 Thread Felix Andrews
Package plotAndPlayGTK provides a graphical user interface for R plots. Wrap it around your plot commands, like playwith(plot(mydata)). A window pops up with a Cairo plot device and a toolbar with buttons to interact with the plot. The default buttons allow you to add persistent labels to data

Re: [R] t-distribution

2007-08-02 Thread Richard M. Heiberger
I believe you are looking for the functionality I have in the norm.curve function in the HH package. Download and install HH from CRAN and then look at example(norm.curve) __ R-help@stat.math.ethz.ch mailing list

Re: [R] Nonlinear optimization with constraints

2007-08-02 Thread Thomas Lumley
On Wed, 1 Aug 2007, Patrick Burns wrote: If you put in penalties for breaking constraints, it is generally better to make the penalty depend on the size of the violation. This keeps the function continuous (though usually not differentiable at the boundary), and gives the optimizer a hint

[R] Re : beamer error with R

2007-08-02 Thread justin bem
Is it possible to realise slides with R ? Justin BEM BP 1917 Yaoundé Tél (237) 99597295 (237) 22040246 - Message d'origine De : Uwe Ligges [EMAIL PROTECTED] À : Mario Alfonso Morales Rivera [EMAIL PROTECTED] Cc : [EMAIL PROTECTED] Envoyé le : Jeudi, 2 Août 2007, 14h26mn 56s Objet

Re: [R] lasso/lars error

2007-08-02 Thread Prof Brian Ripley
This looks like a question for the package maintainer (as the posting guide said), as was the one you referred to. Please bear in mind PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Anyone who is

[R] y axix number into horizontal direction

2007-08-02 Thread Rebecca Ding
Dear R users, I used plot() and mtext() functions to draw a plot. The numbers: 0,20,35, 40,60,80,100 were in the vertical direction. I'd like to transfer them into the horizontal direction. plot(0,0,xaxt=n,type=n, ylim=c(0,100)) mtext(35,side=2,at=35) Any suggestion? Thanks. Rebecca

[R] Access an entry after reading a table

2007-08-02 Thread Gang Chen
Sorry about this basic question. After reading a table, Model=read.table(ModelMat.txt, header=T) I want to get access to each entry in the table Model. However, if I do Model[1,1] I get the following, [1] A Levels: A B C My question is, how can I just get the entry A without the 2nd line

Re: [R] [R-pkgs] new package plotAndPlayGTK

2007-08-02 Thread Dieter Menne
Felix Andrews felix at nfrac.org writes: Package plotAndPlayGTK provides a graphical user interface for R . This package is based on RGtk2, and so requires the GTK+ libraries. Warning for Windows users: When I installed GTK+ from

[R] ggplot2 qplot and add

2007-08-02 Thread Emilio Gagliardi
Hi there, I have some simple frequencies I want to plot into one graph. I had it working, and now I can't figure out whats going wrong. All the data is stored in a dataframe, and i finally managed to order the factor correctly! Each column is a variable and contains integers for the same set of

Re: [R] t-distribution

2007-08-02 Thread Nair, Murlidharan T
I tried doing it this way. left--2.3 right-2.3 p - seq(0.001,0.999,,1000) x - qt(p,df=9) y - dt(x,df=9) plot(x,y,type=l) x.tmp-x y.tmp-y a-which(x=left) polygon(x=c(x.tmp[a],rev(x.tmp[a])),y=c(y.tmp[a],rep(0,length(y.tmp[a]))),col=gray90) b-which(x=right)

Re: [R] [R-pkgs] new package plotAndPlayGTK

2007-08-02 Thread Gabor Grothendieck
It did not do that for me. Maybe its specific to Win 2K? I am using XP. On 8/2/07, Dieter Menne [EMAIL PROTECTED] wrote: Felix Andrews felix at nfrac.org writes: Package plotAndPlayGTK provides a graphical user interface for R . This package is based on RGtk2, and so requires the

Re: [R] Re : beamer error with R

2007-08-02 Thread Uwe Ligges
justin bem wrote: Is it possible to realise slides with R ? If you want to combine LaTeX and R code, take a look at SWeave. Uwe Ligges Justin BEM BP 1917 Yaoundé Tél (237) 99597295 (237) 22040246 - Message d'origine De : Uwe Ligges [EMAIL PROTECTED] À : Mario Alfonso

Re: [R] simulate() and glm fits

2007-08-02 Thread Prof Brian Ripley
I only see an lm method for simulate, so I think you are getting that by inheritance. It is inappropriate and you do need to add a glm method. As ?simulate says fairly clearly that there is only an lm method in base R, I don't think this is a bug, just user optimism. On Thu, 2 Aug 2007,

Re: [R] Re : beamer error with R

2007-08-02 Thread Saeed Abu Nimeh
I could not think of anything (challenging) to include in slides other than plots as all text (results) can be added to latex slides simply. Save your R plots png, eps, pdf, etc then insert them into your latex slides. justin bem wrote: Is it possible to realise slides with R ? Justin BEM

Re: [R] simulate() and glm fits

2007-08-02 Thread William Valdar
This is true. It does not state simulate exists for anything other than lm. Nonetheless, taken together, the help page items Description (Simulate one or more response vectors from the theoretical distribution corresponding to a fitted model object), Details (This is a generic function with a

Re: [R] two plots super-impose

2007-08-02 Thread Sébastien
Hi Philip, par(new=TRUE) before your hist(y) lines should do the trick. You may have to modify some settings in case the axes are not overlayed perfectly. Sebastien [EMAIL PROTECTED] a écrit : Dear R users, I used plot(x,y) to draw a scatter plot. I need to add another smaller histogram

Re: [R] ggplot2 qplot and add

2007-08-02 Thread ONKELINX, Thierry
I think you need something like. qplot(appetitive.stimulus, graphLabels, data=related.differences, size=variance, colour=Appetitive Stimulus, xlim=c(-20,20), main=Title here, xlab=Differences, ylab=Header Concepts) + geom_point(aes(colour = Aversive Stimulus)) HTH, Thierry

[R] two plots super-impose

2007-08-02 Thread Philip.He
Dear R users, I used plot(x,y) to draw a scatter plot. I need to add another smaller histogram on the same plot I just had. However when I used hist(y), the histogram was on another page. Any suggestion? Best Regards, Philip [[alternative HTML version deleted]]

[R] constraint in constrOptim

2007-08-02 Thread André Rossi
I'm using the function constrOptim together with the SANN method and my objective function (f) has two parameters. One of the parameters needs be into (2^(-10), 2^4) range and the other into (2^(-2), 2^12) range. How can I do it using constrOptim?? Thank you André Rossi Alertas do

Re: [R] t-distribution

2007-08-02 Thread Stephen Tucker
yes, or p - seq(0.001,0.999,,1000) x - qt(p,df=9) y - dt(x,df=9) plot(x,y,type=l) f - function(x,y,...) { polygon(x=c(x,rev(x)),y=c(y,rep(0,length(y))),...) } with(data.frame(x,y)[x = 2.3,],f(x,y,col=gray90)) with(data.frame(x,y)[x = -2.3,],f(x,y,col=gray90)) --- Nair, Murlidharan T [EMAIL

Re: [R] ggplot2 qplot and add

2007-08-02 Thread hadley wickham
On 8/2/07, ONKELINX, Thierry [EMAIL PROTECTED] wrote: I think you need something like. qplot(appetitive.stimulus, graphLabels, data=related.differences, size=variance, colour=Appetitive Stimulus, xlim=c(-20,20), main=Title here, xlab=Differences, ylab=Header Concepts) + geom_point(aes(colour

Re: [R] y axix number into horizontal direction

2007-08-02 Thread Stephen Tucker
try par(las=1) plot(0,0,xaxt=n,type=n, ylim=c(0,100)) mtext(35,side=2,at=35) you can use 'las=1' in par(), plot(), axis(), etc. more generally, you can use 'srt' in text() to rotate tick labels: plot(1:10,1:10,xaxt=n,type=n, yaxt=n,ylim=c(0,100)) axis(1); axis(2,lab=FALSE)

[R] Streamlining Prcomp Data

2007-08-02 Thread Wayne Aldo Gavioli
Hello all, I was wondering if anyone knew how to get R to only spit out a certain portion of PRcomp data; namely, when I enter the following code, I get: Summary(prcomp(USArrests)) Importance of components: PC1 PC2 PC3 PC4 Standard Deviation 83.732 14.212

Re: [R] constraint in constrOptim

2007-08-02 Thread Paul Smith
On 8/2/07, André Rossi [EMAIL PROTECTED] wrote: I'm using the function constrOptim together with the SANN method and my objective function (f) has two parameters. One of the parameters needs be into (2^(-10), 2^4) range and the other into (2^(-2), 2^12) range. How can I do it using

Re: [R] constraint in constrOptim

2007-08-02 Thread Paul Smith
On 8/2/07, Paul Smith [EMAIL PROTECTED] wrote: I'm using the function constrOptim together with the SANN method and my objective function (f) has two parameters. One of the parameters needs be into (2^(-10), 2^4) range and the other into (2^(-2), 2^12) range. How can I do it using

[R] - round() strange behaviour

2007-08-02 Thread Monica Pisica
Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even For example: round(1.5)[1] 2 round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2. Do you have any explanation for that? I really

Re: [R] - round() strange behaviour

2007-08-02 Thread Peter Dalgaard
Monica Pisica wrote: Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even For example: round(1.5)[1] 2 round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2. Do you have

Re: [R] - round() strange behaviour

2007-08-02 Thread Thomas Lumley
On Thu, 2 Aug 2007, Monica Pisica wrote: Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even Yes. This is explained in the help page for round(). -thomas Thomas Lumley Assoc.

Re: [R] colored heights in 3D plot (persp)

2007-08-02 Thread Greg Snow
The persp function has a col argument that you can use to specify the colors. -Original Message- From: Juliane Willert [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch r-help@stat.math.ethz.ch Sent: 7/26/07 12:55 AM Subject: [R] colored heights in 3D plot (persp) Hello everybody, I have a

Re: [R] - round() strange behaviour

2007-08-02 Thread JRG
On 2 Aug 2007 at 20:16, Monica Pisica wrote: Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even For example: round(1.5)[1] 2 round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2.

Re: [R] - round() strange behaviour

2007-08-02 Thread Monica Pisica
Hi again, Mea culpa for not reading help pages before hand - but one would not go there when the function syntax is obvious and known besides other programming languages (for example IDL) with same function do not round to the next even number so i do get 3 for round(2.5), and i

Re: [R] - round() strange behaviour

2007-08-02 Thread Achim Zeileis
On Thu, 2 Aug 2007, Monica Pisica wrote: Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even For example: round(1.5)[1] 2 round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2. Do you

Re: [R] - round() strange behaviour

2007-08-02 Thread David C. Howell
That is what it is supposed to do. From ?round we get Note that for rounding off a 5, the IEC 60559 standard is expected to be used, “go to the even digit”. Therefore round(0.5) is 0 and round(-1.5) is -2. However, this is dependent on OS services and on representation error (since e.g. 0.15

[R] plot to postscript orientation

2007-08-02 Thread Miruna Petrescu-Prahova
Hi I am trying to save some plots in a postscript file. When I generate the plots in the main window, they appear correctly - their orientation is landscape (i.e., horizontal). However, when I open the .ps file with GSview, the whole page appears vertically, and the plot appears

[R] installing RGtk2

2007-08-02 Thread steve
I am using ubuntu. When I tried install.packages(RGtk2) it downloaded and seemed to compile successfully: ** building package indices ... * DONE (RGtk2) The downloaded packages are in /tmp/Rtmp57id87/downloaded_packages However, when I tried library(RGtk2) I found Error in

[R] Towards genetic programming...

2007-08-02 Thread Atte Tenkanen
Hellou R-users, I've been interested in genetic programming and succeeded in doing a simple R-application which creates similarity measures for musical set theory. Before that program I made an even simpler program which generates mathematical functions and plots them. If you are interested

Re: [R] installing RGtk2

2007-08-02 Thread Dirk Eddelbuettel
On Thu, Aug 02, 2007 at 05:12:23PM -0400, steve wrote: I am using ubuntu. When I tried install.packages(RGtk2) it downloaded and seemed to compile successfully: Please try $ sudo apt-get install r-cran-rgtk2 which should also install a matching r-cran-cairodevice. ** building

[R] looking for a french speaking R specialist for training

2007-08-02 Thread Philippe Rousselot
Hi, sorry if it is the wrong place to post this. I am looking for someone to teach R. I will continue in french as the job will be done in french only. Bonjour, je cherche un formateur sur R pour des cycles de formations continues, le premier débutant en octobre-novembre. vu le sujet, la

[R] problem with reading data files with different numbers of lines to skips

2007-08-02 Thread Tom Cohen
Dear List, I have 30 data files with different numbers of lines (31 and 33) that I want to skip before reading the files. If I use the skip option I can only choose either to skip 31 or 33 lines. The data files with 31 lines have no blank rows between the lines and the header row. How

Re: [R] y axix number into horizontal direction

2007-08-02 Thread John Kane
?par see las This should work --- plot(0,0,xaxt=n, type=n, ylim=c(0,100), las=1, ) mtext(35,side=2,at=35, line =1, las=1) --- --- Rebecca Ding [EMAIL PROTECTED] wrote: Dear R users, I used plot() and mtext()

Re: [R] ggplot2 qplot and add

2007-08-02 Thread Emilio Gagliardi
Hi Thierry and Hadley, Thanks for your help! I got it working almost 100% to what I want. My last questions are simple I think ;) 1) How can I pass a label to colour and assign the color at the same time? The auto-selection of colors is awesome for learning, but makes it harder to see some

Re: [R] problem with reading data files with different numbers of lines to skips

2007-08-02 Thread Ross Darnell
You could read the file and test each line (try readline()) but you need some rule to distinguish between text lines and data lines. You could then reread the file with the number of skip lines defined. Ross Darnell -Original Message- From: [EMAIL PROTECTED] on behalf of Tom Cohen

Re: [R] problem with reading data files with different numbers of lines to skips

2007-08-02 Thread Gabor Grothendieck
See: http://tolstoy.newcastle.edu.au/R/help/03b/6094.html On 8/2/07, Tom Cohen [EMAIL PROTECTED] wrote: Dear List, I have 30 data files with different numbers of lines (31 and 33) that I want to skip before reading the files. If I use the skip option I can only choose either to skip 31

Re: [R] Q: calling par() in .First()

2007-08-02 Thread Thomas Lumley
On Thu, 2 Aug 2007, D. R. Evans wrote: As a result of another thread here, I need to be sure that the function par(bg='white') has executed before I create a plot. The simplest thing seemed to put it in .Rprofile: .First - function() { options(width=150) par(bg='white') } But now R

Re: [R] problem with reading data files with different numbers o

2007-08-02 Thread Ted Harding
On 02-Aug-07 21:14:20, Tom Cohen wrote: Dear List, I have 30 data files with different numbers of lines (31 and 33) that I want to skip before reading the files. If I use the skip option I can only choose either to skip 31 or 33 lines. The data files with 31 lines have no blank rows

[R] Q: calling par() in .First()

2007-08-02 Thread D. R. Evans
As a result of another thread here, I need to be sure that the function par(bg='white') has executed before I create a plot. The simplest thing seemed to put it in .Rprofile: .First - function() { options(width=150) par(bg='white') } But now R complains at startup: Error in .First() :

Re: [R] problem with reading data files with different numbers o

2007-08-02 Thread Ted Harding
On 02-Aug-07 21:14:20, Tom Cohen wrote: Dear List, I have 30 data files with different numbers of lines (31 and 33) that I want to skip before reading the files. If I use the skip option I can only choose either to skip 31 or 33 lines. The data files with 31 lines have no blank rows

Re: [R] installing RGtk2

2007-08-02 Thread Dirk Eddelbuettel
On Thu, Aug 02, 2007 at 08:02:09PM -0400, steve wrote: A bit more information Ubuntu: dapper drake with all updates R: 2.5.0 RGtk2: 2_2.11.0-1 cairoDevice 2.3.0 sudo apt-get install r-cran-rgtk2 Reading package lists... Done Building dependency tree... Done E: Couldn't find package

Re: [R] installing RGtk2

2007-08-02 Thread steve
A bit more information Ubuntu: dapper drake with all updates R: 2.5.0 RGtk2: 2_2.11.0-1 cairoDevice 2.3.0 sudo apt-get install r-cran-rgtk2 Reading package lists... Done Building dependency tree... Done E: Couldn't find package r-cran-rgtk2 __

[R] Managing global/local variables when creating R packages

2007-08-02 Thread Bethany Kok
I'm working on a package for R to create graphs for modeling interactions between latent variables in SEM. At the moment, I have one function which performs the necessary steps to prepare the data for graphing, and then separate graphing functions depending on what graph type (or types) the

  1   2   >