Re: [R] Axes of a histogram

2006-09-08 Thread Rotkiv, Rehceb
You're right, that's exactly what I needed! Thanks! Rehceb On Thu, 2006-09-07 at 14:47 +0200, Dimitris Rizopoulos wrote: probably you're looking for a barplot, e.g., v - c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4) plot(factor(v)) I hope it helps. Best, Dimitris Dimitris Rizopoulos

Re: [R] my error with augPred

2006-09-08 Thread Petr Pikal
Hi Spencer Thank you for your reply. I tried as you shad suggested and it seems to me that problem comes from this piece of code contr - object$contrasts Browse[1] debug: for (i in names(dataMix)) { if (inherits(dataMix[, i], factor) !is.null(contr[[i]])) { levs - levels(dataMix[,

[R] subsetting a data set

2006-09-08 Thread Graham Smith
I have a data set called GQ1, which has 20 variables one of which is a factor called Status at thre levels Expert, Ecol and Stake I have managed to evaluate some of the data split by status using commands like: summary (Max[Status==Ecol]) BUT how do I produce asummary for Ecol and Expert

Re: [R] problem with putting objects in list

2006-09-08 Thread Rainer M Krug
Well - it must be that the whole concept of lists, vectors / matrices, objects, data frames is not that clear to me. From my background (Delphi, Basic), I am used to that, when referencing dr[i] I get the object which is stored in the list. Is there any manual / technical manual / reference

Re: [R] problem with putting objects in list

2006-09-08 Thread Rainer M Krug
Thanks a lot - it looks like the sort of manual I was looking for - Could I suggest of including it into the list of manuals for R? (If it is already there, my apologies) Rainer Patrick Burns wrote: S Poetry should help you understand this. See especially the section of chapter 1 on

Re: [R] problem with putting objects in list

2006-09-08 Thread Rainer M Krug
Thanks a lot Tony this explains a lot. I am not aware to have read such a good explanation about this issue before. I would suggest to add it to the FAQs. Rainer Tony Plate wrote: I suspect you are not thinking about the list and the subsetting/extraction operators in the right way. A list

Re: [R] Weighted association map

2006-09-08 Thread kone
Could somebody program this kind of plot type to R, if none exists, based on mds or correlation tables or some more suitable method? What do you think about idea? Does it work? None similar or better exists? http://weightedassociationmap.blogspot.com/ Atte Tenkanen University of

Re: [R] subsetting a data set

2006-09-08 Thread Petr Pikal
Hi I am not sure if your Max is the same as max so I am not sure what you exactly want from your data. However you shall consult ?tapply, ?by, ?aggregate and maybe also ?[ together with chapter 2 in intro manual in docs directory. aggregate(data[, some.columns], list(data$factor1,

Re: [R] subsetting a data set

2006-09-08 Thread Graham Smith
Petr, Thanks I shall have at look at these options. Sorry about the confusion with the Max, in my example Max is the name of the variable that I am summarising. I chose a poor example to cut and paste form R, not thinking about the obvious confusion this would cause. Thanks again Graham On

Re: [R] subsetting a data set

2006-09-08 Thread Petr Pikal
Sorry, I did not notice that in your case Max is not a function but your data. So probably by(Max[, your.columns], list(Max$status), summary) is maybe what you want. HTH Petr On 8 Sep 2006 at 10:31, Petr Pikal wrote: From: Petr Pikal [EMAIL PROTECTED] To:

Re: [R] subsetting a data set

2006-09-08 Thread Petr Pikal
Hi if you use summary aggregate probably will not work and tapply have to be called differently tapply(seq(along=Max[,1]), list(Max$Status), function(i, x) summary(x[i]), x=Max[,one.column]) or you can use by by(Max[,1:5]), list(Max$Status), summary) or if you do not like the output

Re: [R] subsetting a data set

2006-09-08 Thread Graham Smith
Petr, Thanks again, but the data is GQ1, Max is a variable (column) So I have used by(GQ1[,Max], list(GQ1$Status), summary) Which is very good, and is better than the way I did it before by summarising for each status level individually, but that still isn't combing the data for Status ==

Re: [R] Weighted association map

2006-09-08 Thread Gabor Grothendieck
Try the sna package. Below we calculate the correlation matrix, kor, of the numeric cols of builtin iris dataset. Zap negative ones and discretize rest to get lwd width matrix, lwd, used for edge widths. From that create the adjacency matrix, sign(lwd), and plot it using indicated layout mode.

[R] Computing skewness and kurtosis with the moments package

2006-09-08 Thread Roger Leigh
Hi, I'm a newcomer to R, having previously used SPSS. One problem I have run into is computing kurtosis. A test dataset is here: http://www.whinlatter.ukfsn.org/2401.dat library(moments) data - read.table(2401.dat, header=T) attach(data) loglen - log10(Length) With SPSS, I get Skewness

[R] R drop behavior -- set as option in later version?

2006-09-08 Thread Balaji S. Srinivasan
Hi, I know the topic of drop=TRUE/FALSE has been discussed quite a bit, but I was wondering whether it might be possible to set drop=FALSE as a global setting (e.g. as an option in options()) so that one does not have to remember to write it every time you do an operation which might return a 1

Re: [R] subsetting a data set

2006-09-08 Thread Sean O'Riordain
Hi Graham, Try creating a new column with the two levels that you want... something along the lines of (warning untested!!!) GQ1[(GQ1$Status == Expert) | (GQ1$Status == Ecol),]$newColumn - AllEcol GQ1[GQ1$Status == Stake,]$newColumn - Stake and then do the by(GQ1[,Max], list(GQ1$NewColumn),

Re: [R] subsetting a data set

2006-09-08 Thread Graham Smith
Sian On 08/09/06, Sean O'Riordain [EMAIL PROTECTED] wrote: Hi Graham, Try creating a new column with the two levels that you want... something along the lines of (warning untested!!!) GQ1[(GQ1$Status == Expert) | (GQ1$Status == Ecol),]$newColumn - AllEcol GQ1[GQ1$Status ==

[R] Connecting to R using Perl?

2006-09-08 Thread Ffenics
Hi there Can anyone tell me please if I can access R though a perl script? And whether there are some internet resources/books I can use to help me? Thanks [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] subsetting a data set

2006-09-08 Thread Petr Pikal
Hi On 8 Sep 2006 at 10:33, Graham Smith wrote: Date sent: Fri, 8 Sep 2006 10:33:49 +0100 From: Graham Smith [EMAIL PROTECTED] To: Petr Pikal [EMAIL PROTECTED] Copies to: r-help@stat.math.ethz.ch Subject:Re: [R]

Re: [R] subsetting a data set

2006-09-08 Thread Graham Smith
Sean, This seems to be getting there except that I am going to need a data.frameto hold AllEcol rather than a column, as GQ1 has 16 variable. So maybe this needs turned around into something like AllEcol- GQ1[(GQ1$Status == Expert) | (GQ1$Status == Ecol),] Except this doesn't work, as I

Re: [R] R drop behavior -- set as option in later version?

2006-09-08 Thread Gregor Gorjanc
Balaji S. Srinivasan balajis at stanford.edu writes: ... Hello, I agree with you that you find yourself typing the same constructs over and over. I think that we need to distinguish two modes of working with R. If you do analysis, then you can really get tired of typing drop=FALSE, na.rm=TRUE

Re: [R] subsetting a data set

2006-09-08 Thread Graham Smith
Petr, Thanks, I shall store all this away for reference and have a look at the posting guide. I didn't expect it to be as complicated as it has turned out. As you will see from my post to Sian, my pressing problem was solved by replacing the with an | in the sample code I gave. Graham On

Re: [R] Weighted association map

2006-09-08 Thread Gabor Grothendieck
Actually the discretization does not appear to be needed. This works just as well: set.seed(123) kor - cor(iris[1:4]) gplot(sign(kor), edge.lwd = 10*kor, displaylabels = TRUE, label = rownames(kor)) On 9/8/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Try the sna package. Below we calculate

[R] Conservative ANOVA tables in lmer

2006-09-08 Thread Fabian Scheipl
Dear list, I have written functions to perform simulation-based tests of HO: Var(Random Effects)=0, beta_foo=0 in linear mixed models based on the exact distribution of the LR- and Restricted LR-test statistic (see research presented in Crainiceanu, Ruppert: LRT in LMM with 1 variance

[R] how to construct stripchart with coincident points centered

2006-09-08 Thread Berta
Hi R-users, I am using stripchart with coincident points, y -rbinom(100, 3, 0.5) stripchart(y, method=stack, pch=o, vertical=TRUE) But the result is not centered in the sense that if a value (say value 0) is repeated 7 times, the first point is ploted in the middle and the rest at its right

Re: [R] R drop behavior -- set as option in later version?

2006-09-08 Thread Martin Maechler
Wrong Mailing List !! Proposals for changes to R should be discussed on R-devel, see the posting guide. I'll reply separately, but only CC to R-devel. Martin Maechler, ETH Zurich __ R-help@stat.math.ethz.ch mailing list

Re: [R] R drop behavior -- set as option in later version?

2006-09-08 Thread Gregor Gorjanc
Martin Maechler wrote: Wrong Mailing List !! Proposals for changes to R should be discussed on R-devel, see the posting guide. I'll reply separately, but only CC to R-devel. You are right, but I think that this might be an overkill. But, who am I to decide that anyway! I actually excited

[R] Multiple matrix multiplication with two 3-dimensional arrays

2006-09-08 Thread Sophie Baillargeon
Hi, I need to do several matrix multiplications with the corresponding matrices forming two 3-dimentional arrays. To illustrate my problem, let's say I have the following 3-dimensional arrays: array1 - array(1:30,dim=c(3,2,5)) array2 - array(1:20,dim=c(2,2,5)) I know that I can get what I

[R] repeating values

2006-09-08 Thread Anders Bjørgesæter
Hello I have 2 two vectors like x N 2 3 4 1 5 2 and want to make a new vector x 2 2 2 4 5 5 i.e. repeat the values in x according to N Thanks for your help. Best Regards Anders __ R-help@stat.math.ethz.ch mailing list

Re: [R] repeating values

2006-09-08 Thread Dimitris Rizopoulos
just use rep(), e.g., x - c(2, 4, 5) N - c(3, 1, 2) rep(x, N) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web:

Re: [R] how to construct stripchart with coincident points centered

2006-09-08 Thread Robert Baer
You may be looking for: stripchart(y, method=jitter, pch=o, vertical=TRUE,jitter=.5) Rob Robert W. Baer, Ph.D. Associate Professor Department of Physiology A. T. Still University of Health Science 800 W. Jefferson St. Kirksville, MO 63501-1497 USA - Original

Re: [R] Multiple matrix multiplication with two 3-dimensional arrays

2006-09-08 Thread Gabor Grothendieck
If the arrays are a1 and a2 then: library(abind) abind(lapply(1:dim(a1)[3], function(i) a1[,,i] %*% a2[,,i]), along = 3) On 9/8/06, Sophie Baillargeon [EMAIL PROTECTED] wrote: Hi, I need to do several matrix multiplications with the corresponding matrices forming two 3-dimentional arrays.

Re: [R] Conservative ANOVA tables in lmer

2006-09-08 Thread Fabian Scheipl
Dear list, I have written functions to perform simulation-based tests of HO: Var(Random Effects)=0, beta_foo=0 in linear mixed models based on the exact distribution of the LR- and Restricted LR-test statistic (see research presented in Crainiceanu, Ruppert: LRT in LMM with 1 variance

Re: [R] problem with putting objects in list

2006-09-08 Thread Mike Prager
Rainer M Krug [EMAIL PROTECTED] wrote: Is there any manual / technical manual / reference available which explains all this? The normal manual (Introduction into R) didn't made it clear to me. Go to http://www.r-project.org/ and on the left side of the page is a heading, Documentation, with

Re: [R] reading images in R

2006-09-08 Thread Greg Snow
Look at the pixmap and rimage packages. -Original Message- From: [EMAIL PROTECTED] on behalf of Nair, Murlidharan T Sent: Thu 9/7/2006 3:38 PM To: r-help@stat.math.ethz.ch Subject: [R] reading images in R Are there functions to read image files in jpg, gif or even a pdf file?

Re: [R] Connecting to R using Perl?

2006-09-08 Thread BBands
On 9/8/06, Ffenics [EMAIL PROTECTED] wrote: Hi there Can anyone tell me please if I can access R though a perl script? http://www.omegahat.org/RSPerl/ And there is always: http://rpy.sourceforge.net/ jab -- John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you

Re: [R] counting process form of a cox model (cluster(id))

2006-09-08 Thread Terry Therneau
Zoe writes: My question is quick. I am looking at 1 event (death), and repeated measurements (the time dependent covariate 'lqol') are frequently taken on a subject, so I assume that measurements on the same subject will be correlated. The answer is: no, it's not a problem When the time

[R] Connecting to a SQLBASE database with R

2006-09-08 Thread SPIESSER Vincent
Hi, I am trying to extract data from a database with R in order to produce monthly statistics. I found in the R Website, the package RODBC, RSQLite and others ones which permit this kind of extraction. The database I want to be connected with is a SQLBASE 7.0 database. So, I would like to

[R] JGR on SUSE 10.1 AMD 64

2006-09-08 Thread Tomas Willebrand
Dear list; I have R Version 2.3.1 (2006-06-01) installed on a AMD 64 machine with SUSE 10.1. I have Sun Java version 1.5.0-sun installed. I have used install.packages(JGR, dep=TRUE) to install rJava, iplots and JGR. I would like to do a presentation of linux and R for the department!

[R] Confidence intervals on Lowess (eg SiZer from J.S.Marron)

2006-09-08 Thread Dalphin, Mark
Hi, I have some very noisy, relatively sparse data; a biological response of roughly ~8 subjects at ~8 times points). I've been following the data trend using a lowess line, over-plotted with several values of bandwidth, 'f - seq(0.3, 0.9, by=0.1)'. At this point, we have no models for these

Re: [R] augPred plot in nlme library

2006-09-08 Thread Afshartous, David
All, I've solved part of the problem below by making sure that the formula in the grouped data object is the same as the formula specified within lme (this isn't the case in the cited example from Pinheiro Bates). However, augPred seems to plot only a linear model instead of the polynomial

Re: [R] Computing skewness and kurtosis with the moments package

2006-09-08 Thread Ben Bolker
Roger Leigh rleigh at whinlatter.ukfsn.org writes: With SPSS, I get Skewness -0.320 Kurtosis -1.138 With R: skewness(loglen) [1] -0.317923 kurtosis(loglen) [1] 1.860847 Using the example skew and kurtosis functions from M. J. Crawley's Statistics: An introduction using R: pp

Re: [R] Connecting to a SQLBASE database with R

2006-09-08 Thread Prof Brian Ripley
You haven't told us your OS. SQLBase would appear to have a Windows ODBC driver, so RODBC should be usable. I doubt it any other solution is (and RSQLite works only with SQLite). On Fri, 8 Sep 2006, SPIESSER Vincent wrote: I am trying to extract data from a database with R in order to

Re: [R] Connecting to a SQLBASE database with R

2006-09-08 Thread Antonio, Fabio Di Narzo
The ODBC protocol is a widely used standard for accessing databases sources, especially under m$ windows. I think you can use RODBC for accessing your SQLBASE data, at least after some machine configuration... Antonio. 2006/9/8, SPIESSER Vincent [EMAIL PROTECTED]: Hi, I am trying to extract

Re: [R] augPred plot in nlme library

2006-09-08 Thread Deepayan Sarkar
On 9/8/06, Afshartous, David [EMAIL PROTECTED] wrote: All, I've solved part of the problem below by making sure that the formula in the grouped data object is the same as the formula specified within lme (this isn't the case in the cited example from Pinheiro Bates). However, augPred seems

Re: [R] augPred plot in nlme library

2006-09-08 Thread Afshartous, David
Deepayan, Thanks for your suggestion. Here are more details: I have a grouped data object for repeated measures data just like the Pixel grouped data object on p.42 of Pinheiro and Bates (2000). comp.adj.UKV.3 - groupedData(adj.UKV ~ Time | Patient_no/Lisinopril, data =

Re: [R] augPred plot in nlme library

2006-09-08 Thread Deepayan Sarkar
On 9/8/06, Afshartous, David [EMAIL PROTECTED] wrote: Deepayan, Thanks for your suggestion. Here are more details: Yes, but none of it qualifies as commented, minimal, self-contained, reproducible code. Let's hope someone else on this list is kind enough and has enough free time to dream up

[R] boundary constraints with smooth.spline

2006-09-08 Thread Will Sheffler
Hi R Community. I would like to use smooth.spline to fit a set of data and constrain the endpoints of the fit to have specific derivatives. I know this is possible with cubic splines, but I can't figure out how to specify this with arguments to the smooth.spline function. In general, is it

Re: [R] augPred plot in nlme library

2006-09-08 Thread Andrew Robinson
Hi David, this is the sort of thing that Deepayan meant. Make a dataset available to us, or use one that will be installed by default on R. eg require(nlme) fm1 - lme(distance ~ age, data = Orthodont) plot(augPred(fm1)) # All linear fm2a - lme(distance ~ age + age.2, data = Orthodont)

Re: [R] Connecting to a SQLBASE database with R

2006-09-08 Thread BBands
for RODBC you must make a connection SQLBASE first: For XP: control panel Admin tools Data sources Add... You may have to install the SQLBASE ODBC driver first if it is not on the list. The rest should be easy just supply the connection name and details to RODBC. jab -- John Bollinger,

Re: [R] Connecting to a SQLBASE database with R

2006-09-08 Thread Duncan Murdoch
On 9/8/2006 9:53 AM, SPIESSER Vincent wrote: Hi, I am trying to extract data from a database with R in order to produce monthly statistics. I found in the R Website, the package RODBC, RSQLite and others ones which permit this kind of extraction. The database I want to be connected

Re: [R] Conservative ANOVA tables in lmer

2006-09-08 Thread Douglas Bates
On 9/7/06, Douglas Bates [EMAIL PROTECTED] wrote: On 07 Sep 2006 17:20:29 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Martin Maechler [EMAIL PROTECTED] writes: DB == Douglas Bates [EMAIL PROTECTED] on Thu, 7 Sep 2006 07:59:58 -0500 writes: DB Thanks for your summary,

[R] maximizing a likelihood function containing an integral

2006-09-08 Thread Sam Wong
Hi, R Users; I am trying to maximize a likelihood function which contains an integral. The integral contains the unknown parameter as well. I am trying to use the following code to do the maximization: ll-function(b.vec){ b0-b.vec[1] b1-b.vec[2] b2-b.vec[3]

[R] How to actively join you all

2006-09-08 Thread gyadav
Hello R Community, I am really impressed by the 'R'. I am a computer engineer. Further, I have done work on Linux Code at my home and Worked on Cisco IOS platform. I would like to contribute to the software i.e. i would like to devote my free time for its development, but i do not know how to

Re: [R] How to actively join you all

2006-09-08 Thread gyadav
Hi Gabor, i went to this link via the views link given by you, http://cran.r-project.org/src/contrib/VaR_0.2.tar.gz but it gives me an error when i try to open it by winzip. It gives me error message - Error reading header after processing 0 entries Further, As I am now also a finance grad

Re: [R] converting decimal - hexadecimal

2006-09-08 Thread Dan Gunter
Romain Lorrilliere wrote: Hi, do you know, a method to convert an decimal value (integer) to the corresponding hexadecimal value ? thinks for help. Romain You mean representation, not value; the value doesn't change. One method is sprintf with the %x formatting code. -Dan -- Dan

Re: [R] Multiple matrix multiplication with two 3-dimensional arrays

2006-09-08 Thread Anupam Tyagi
Sophie Baillargeon Sophie.Baillargeon at mat.ulaval.ca writes: Maybe I could use an apply or something but I can't figure out how. I would have hoped that simply doing array1%*%array2 would work, but it doesn’t… I think one of the issues is that algebra for N-Dimentional arrays are not