Re: [R] URL error when trying to use help function in R [Sec: UNOFFICIAL]

2010-09-10 Thread Peter Dalgaard
On 09/10/2010 01:03 AM, David Winsemius wrote: On Sep 9, 2010, at 6:34 PM, Gosse, Michelle wrote: Greetings, I am using R version 2.11.1 on a Dell computer, via a VMware connection to a remote server. My browser version is IE 8.0.6001.18702 and the OS is some corporate version of

[R] covariance matrix structure for random effect in glmmPQL

2010-09-10 Thread Qiu, Weiyu
Dear all, I'm using R function glmmPQL in MASS package for generalized linear mixed model considering the temporal correlations in random effect. There are 1825 observations in my data, in which the random effect is called Date, and there are five levels in Date, each repeats 365 times. When

Re: [R] Help on simple problem with optim

2010-09-10 Thread Berend Hasselman
It is indeed a negative value for sigma that causes the issue. You can check this by inserting this line if(sigma = 0 ) cat(Negative sigma=,sigma,\n) after the line mu - x %*% beta in function llk.mar Negative values for sigma can be avoided with the use of a transformation

Re: [R] Simulation

2010-09-10 Thread Jim Silverton
I have two questions: (1) How do you 'create' an 2 x 2 table in R using say an Odd ratio of 3 or even 0.5 (2) If I have several 2 x 2 tables, how can I 'implement' dependence in the tables with say 25 of the Tables having an odds ratio of 1 and 75 of the tables having an odds ratio of 4? Jim

Re: [R] Help request: highlighting R code on WordPress.com blogs

2010-09-10 Thread Tal Galili
Hello D, Thanks for sharing your technique, nice work :) I hope the solution the people here are helping with will make it both cheaper and simpler for people with less CSS expreince. p.s: thank you for the kinds words regarding R-bloggers.com Best, Tal Contact

Re: [R] URL error when trying to use help function in R [Sec: UNOFFICIAL]

2010-09-10 Thread Petr PIKAL
Hi I had similar issue and it was solved by setting proxy in browser preferences to do not use proxy server for 127.0.0.1 and it helped. Regards Petr r-help-boun...@r-project.org napsal dne 10.09.2010 08:18:53: On 09/10/2010 01:03 AM, David Winsemius wrote: On Sep 9, 2010, at 6:34

[R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread omerle
Hi, I got two questions : 1st Question             a=S             b=data.frame(S=3)             do.call(`-`,list(do.call(`$`,list(b,S)),5)) = How can I put new values on S column having the column name as a variable ? 2 nd Question        a=S       

[R] importing third party hierarchical clustering data into R

2010-09-10 Thread socter
hi, I have created a hierarchical clustering program which reads in data and clusters them. The next part of the problem is to visualize the results. I would like to know how i could import my cluster results into the R hclust object so that i can visualise using the ggobi library. Or if there

[R] Odp: Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 10.09.2010 10:05:37: Hi, I got two questions : 1st Question          a=S          b=data.frame(S=3)          do.call(`-`,list(do.call(`$`,list(b,S)),5)) = How can I put new values on S column having the

Re: [R] lmer fixed effects, SE, t . . . and p

2010-09-10 Thread Gavin Simpson
On Thu, 2010-09-09 at 23:40 -0400, John Sorkin wrote: Bert, I appreciate you comments, and I have read Doug Bates writing about p values in mixed effects regression. It is precisely because I read Doug's material that I asked how are we to interpret the estimates rather than how can we

[R] (no subject)

2010-09-10 Thread Tanvir Khan
Hello, I'm trying to do bar plot where 'sex' will be the category axis and 'occupation' will represent the bars and the clusters will represent the mean 'income'. sex occupation income 1 female j 12 2male b34 3male j

Re: [R] rgl and lighting

2010-09-10 Thread james.foadi
Yes. A white cube and all lights off to start with give me what I want. Many thanks! J Dr James Foadi PhD Membrane Protein Laboratory (MPL) Diamond Light Source Ltd Diamond House Harewell Science and Innovation Campus Chilton, Didcot Oxfordshire OX11 0DE Email: james.fo...@diamond.ac.uk

Re: [R] faster unlist,strsplit,gsub,for

2010-09-10 Thread Romain Francois
Hi, You can leverage read.table using a textConnection: txt - x,y,z,a,b,c,dda,b,c,d,e,f,gd con - textConnection( gsub( d, \\\n, txt ) ) read.table( con, sep = , ) V1 V2 V3 V4 V5 V6 V7 1 x y z a b c d 2 a b c d e f g close( con ) Romain Le 10/09/10 06:41, rajesh j a écrit :

Re: [R] (no subject)

2010-09-10 Thread ONKELINX, Thierry
Have a look at the ggplot2 package install.packages(ggplot2) library(ggplot2) ggplot(data, aes(x = sex, y = income, fill = occupation)) + geom_bar(position = dodge) Have a look at http://had.co.nz/ggplot2/ for more information and examples. HTH, Thierry

Re: [R] Alignment of lines within barplot bars

2010-09-10 Thread Jim Lemon
On 09/10/2010 01:35 AM, Steve Murray wrote: Dear all, I have a barplot upon which I hope to superimpose horizontal lines extending across the width of each bar. I am able to partly achieve this through the following set of commands: positions- barplot(bar_values, col=grey) par(new=TRUE)

[R] Barplots, was Re: (no subject)

2010-09-10 Thread peter dalgaard
On Sep 10, 2010, at 11:38 , Tanvir Khan wrote: Hello, I'm trying to do bar plot where 'sex' will be the category axis and 'occupation' will represent the bars and the clusters will represent the mean 'income'. sex occupation income 1 female j 12 2male

Re: [R] Axis break with gap.plot()

2010-09-10 Thread Jim Lemon
On 09/10/2010 01:07 AM, Filoche wrote: Hi everyone. I'm trying to break the y axis on a plot. For instance, I have 2 series (points and a loess). Since the loess is a continuous set of points, it passes in the break section. However, with gap.plot I cant plot the loess because of this (I got

Re: [R] (no subject)

2010-09-10 Thread Jim Lemon
On 09/10/2010 07:38 PM, Tanvir Khan wrote: Hello, I'm trying to do bar plot where 'sex' will be the category axis and 'occupation' will represent the bars and the clusters will represent the mean 'income'. sex occupation income 1 female j 12 2male b

[R] Standardized logistic regression coefficients

2010-09-10 Thread Iasonas Lamprianou
Dear all, I am looking for ways to compute standardized logistic regression coefficients. I found papers describing at least 6 different ways to standardize logistic regression coefficients. I also found a very old (Thu May 12 21:50:36 CEST 2005) suggestion by Frank E Harrell (one of the

[R] Standardized Logistic Regression coefficients

2010-09-10 Thread Iasonas Lamprianou
Dear all, I am looking for ways to compute standardized logistic regression coefficients. Before asking for your time I did some homework. I found papers describing at least 6 different ways to standardize logistic regression coefficients. I also found a very old (Thu May 12 21:50:36 CEST

Re: [R] gee p values

2010-09-10 Thread Peng, C
There are two z-scores reported in the summary: Naive z and Robust z. pvalue=2*min(pnorm(z-score), 1-pnorm(z-score)) # two-sided test -- View this message in context: http://r.789695.n4.nabble.com/gee-p-values-tp2533835p2534302.html Sent from the R help mailing list archive at Nabble.com.

[R] lmer output

2010-09-10 Thread Denis . Aydin
Hi I have a question regarding an output of a binomial lmer-model. The model is as follows: lmer(y~diet * day * female + (day|female),family=binomial) The corresponding output is: Generalized linear mixed model fit by the Laplace approximation Formula: y ~ diet * day * female + (day | female)

Re: [R] gee p values

2010-09-10 Thread John Sorkin
Peng, If the answer were as simple as you suggest, I would expect that gee would automatically produce the p values. Since gee does not produce the values, I fear that the computation may be more complex, or perhaps computing p values from gee may be controversial. Do you know which, if either

[R] lme vs. lmer, how do they differ?

2010-09-10 Thread John Sorkin
windows Vista R 2.10.1 What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects regression analyses. Thanks John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology

[R] lme, groupedData, random intercept and slope

2010-09-10 Thread John Sorkin
Windows Vista R 2.10.1 Does the following use of groupedData and lme produce an analysis with both random intercept and slope, or only random slope? zz-groupedData(y~time | Subject,data=data.frame(data), labels = list( x = Time, y = y ), units =

[R] [R-pkgs] plyr: version 1.2

2010-09-10 Thread Hadley Wickham
plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of a data

[R] [R-pkgs] reshape2: a reboot of the reshape package

2010-09-10 Thread Hadley Wickham
Reshape2 is a reboot of the reshape package. It's been over five years since the first release of the package, and in that time I've learned a tremendous amount about R programming, and how to work with data in R. Reshape2 uses that knowledge to make a new package for reshaping data that is much

Re: [R] Over lay 2 scale in same plot

2010-09-10 Thread mamunbabu2001
Hi Josh, Thanks for your reply. I gave a reply yesterday but found that it was not posted. I managed to plot the bar pot and overlay points. The problem I am facing now is the spread of Y scale. The values I am plotting in Y scale are very close. so they look pretty flat. (lowest value 7.5 and

Re: [R] lme vs. lmer, how do they differ?

2010-09-10 Thread S Ellison
John Sorkin jsor...@grecc.umaryland.edu 10/09/2010 13:21:09 What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects regression analyses. From a user's point of view: - lme only accepts nested random effect; lmer handles crossed random effects - lme has

Re: [R] lme vs. lmer, how do they differ?

2010-09-10 Thread Ben Bolker
John Sorkin jsorkin at grecc.umaryland.edu writes: windows Vista R 2.10.1 What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects regression analyses. Thanks John in a nutshell: lmer is newer, much faster, handles crossed random

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread Ista Zahn
Hi, On Fri, Sep 10, 2010 at 4:05 AM, omerle ome...@laposte.net wrote: Hi, I got two questions : 1st Question             a=S             b=data.frame(S=3)             do.call(`-`,list(do.call(`$`,list(b,S)),5)) I think there is some confusion here. Why are you setting a equal to S but

Re: [R] Which language is faster for numerical computation?

2010-09-10 Thread Prof. John C Nash
Dirk E. has properly focussed the discussion on measurement rather than opinion. I'll add the issue of the human time taken to convert, and more importantly debug, interfaced code. That too could be measured, but we rarely see human hours to code/debug/test reported. Moreover, I'll mention the

[R] SSOAP complex request types

2010-09-10 Thread jonnyboi
Hi, I'm having a bit of trouble using SSOAP to send requests containing complex types. It seems as though processWSDL does not generate functions for converting the generated types into SOAP requests, but it does generate them for converting **from** SOAP requests to the complex types. The error

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread omerle
Message du 10/09/10 14:53 De : Ista Zahn A : omerle Copie à : r-help@r-project.org Objet : Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ? Hi, On Fri, Sep 10, 2010 at 4:05 AM, omerle wrote: Hi, I got two questions :

[R] package gbm C++ code as separate module

2010-09-10 Thread Markus Loecher
Dear all, I would like to separate the gbm C++ code from any R dependencies, so that it could be compiled into a standalone module. I am wondering if anyone has already done this and could provide me with some pointers/help ? Thanks! Markus [[alternative HTML version deleted]]

Re: [R] Calculating with tolerances (error propagation)

2010-09-10 Thread David Winsemius
On Sep 9, 2010, at 10:57 AM, David Winsemius wrote: On Sep 9, 2010, at 6:50 AM, Jan private wrote: Hello Bernardo, - If I understood your problem this script solve your problem: q-0.15 + c(-.1,0,.1) h-10 + c(-.1,0,.1) 5*q*h [1] 2.475 7.500 12.625 - OK, this solves the

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread Ista Zahn
On Fri, Sep 10, 2010 at 9:22 AM, omerle ome...@laposte.net wrote: Message du 10/09/10 14:53 De : Ista Zahn A : omerle Copie à : r-help@r-project.org Objet : Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ? Hi, On Fri, Sep 10,

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread Hadley Wickham
I'm having trouble parsing this. What exactly do you want to do? 1 - Put a list as an element of a data.frame. That's quite convenient for my pricing function. I think this is a really bad idea. data.frames are not meant to be used in this way. Why not use a list of lists? It can be very

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread Ivan Calandra
Le 9/10/2010 15:37, Ista Zahn a écrit : On Fri, Sep 10, 2010 at 9:22 AM, omerleome...@laposte.net wrote: Message du 10/09/10 14:53 De : Ista Zahn A : omerle Copie à : r-help@r-project.org Objet : Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with

[R] pairwise.t.test vs t.test

2010-09-10 Thread Jabez Wilson
Dear all, I am perplexed when trying to get the same results using pairwise.t.test and t.test. I'm using examples in the ISwR library, attach(red.cell.folate) I can get the same result for pairwise.t.test and t.test when I set the variances to be non-equal, but not when they are assumed to be

[R] Problem importing square character

2010-09-10 Thread Marcelo Estácio
Dear, When I try to to execute the following command, R don't read all lines (reads only 57658 lines when the file has 814125 lines): dados2-read.table(C:\\Documents and Settings\\mgoncalves\\Desktop\\Tábua

Re: [R] Over lay 2 scale in same plot

2010-09-10 Thread Joshua Wiley
Hi Mamum, You can look at the ylim argument to plot(). It lets you control the limits; however, in your example graph, part of the issue is that the bars have a much higher value, so you could not change ylim too much (looks like in your example graph you could set it to something like ylim =

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread David Winsemius
On Sep 10, 2010, at 9:42 AM, Hadley Wickham wrote: I'm having trouble parsing this. What exactly do you want to do? 1 - Put a list as an element of a data.frame. That's quite convenient for my pricing function. I think this is a really bad idea. data.frames are not meant to be used in this

[R] Can I save my console contents automatically?

2010-09-10 Thread Nobuaki Michihata
Dear All, I'm using R for Mac OS X Cocoa GUI R version 2.11.1. I can save contents of my console window by using command + s, but I would like to do same thing using R commands. My question is can I save the contents automatically by using R editor with some R commands. Thank you. Nobu

[R] modifying axis labels in lattice panels

2010-09-10 Thread Markus Loecher
Dear all, I am struggling to modify the axis labels/ticks in a panel provided to xyplot. To begin with, I do not know the equivalent of the xaxt=n directive for panels that would set the stage for no default x axis being drawn. My goal is to draw ticks and custom formatted labels at certain hours

[R] Save R-Part Tree

2010-09-10 Thread Paul Kramer
Hello, I have some Data, that I analyse using a regression tree (by using rpart). Now I would like to save this tree to a file for later use, and load it (not necessarily in the same workspace). It would be most preferrable, if I could just save some parameters (later probably to a database)

Re: [R] pairwise.t.test vs t.test

2010-09-10 Thread peter dalgaard
On Sep 10, 2010, at 16:01 , Jabez Wilson wrote: Dear all, I am perplexed when trying to get the same results using pairwise.t.test and t.test. I'm using examples in the ISwR library, attach(red.cell.folate) I can get the same result for pairwise.t.test and t.test when I set the

Re: [R] pairwise.t.test vs t.test

2010-09-10 Thread Marc Schwartz
On Sep 10, 2010, at 9:01 AM, Jabez Wilson wrote: Dear all, I am perplexed when trying to get the same results using pairwise.t.test and t.test. I'm using examples in the ISwR library, attach(red.cell.folate) I can get the same result for pairwise.t.test and t.test when I set the

Re: [R] Problem importing square character

2010-09-10 Thread Duncan Murdoch
On 10/09/2010 10:03 AM, Marcelo Estácio wrote: Dear, When I try to to execute the following command, R don't read all lines (reads only 57658 lines when the file has 814125 lines): dados2-read.table(C:\\Documents and Settings\\mgoncalves\\Desktop\\Tábua

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread Hadley Wickham
I think this is a really bad idea. data.frames are not meant to be used in this way. Why not use a list of lists? It can be very convenient, but I suspect the original poster is confused about the different between vectors and lists. I wouldn't be surprised if someone were confused, since

Re: [R] Data.frames : difference between x$a and x[, a] ? - How set new values on x$a with a as variable ?

2010-09-10 Thread Bert Gunter
Well, let's see if the following helps or just adds to the confusion. First lists are vectors of mode list . But they are general recursive structures (in fact, completely general). Second, data frames are lists: each column of a data frame is a component (member) of the list with the additional

Re: [R] Which language is faster for numerical computation?

2010-09-10 Thread Henrik Bengtsson
Don't underestimate the importance of the choice of the algorithm you use. That often makes a huge difference. Also, vectorization is key in R, and when you use that you're really up there among the top performing languages. Here is an example from the official R wiki illustrating my points:

Re: [R] Which language is faster for numerical computation?

2010-09-10 Thread Hadley Wickham
On Fri, Sep 10, 2010 at 10:23 AM, Henrik Bengtsson h...@stat.berkeley.edu wrote: Don't underestimate the importance of the choice of the algorithm you use.  That often makes a huge difference.  Also, vectorization is key in R, and when you use that you're really up there among the top

Re: [R] Regression using mapply?

2010-09-10 Thread Greg Snow
This really depends on why you want to do this and what results you want. If your main goal is to look at some basic tests, goodness of fit, then the add1 function may do everything you need. If you just want coefficient estimates then some basic matrix algebra will give those to you.

Re: [R] pairwise.t.test vs t.test

2010-09-10 Thread Jabez Wilson
Thanks a lot, Peter. Excellent book btw.   Jab --- On Fri, 10/9/10, peter dalgaard pda...@gmail.com wrote: From: peter dalgaard pda...@gmail.com Subject: Re: [R] pairwise.t.test vs t.test To: Jabez Wilson jabez...@yahoo.co.uk Cc: R-Help r-h...@stat.math.ethz.ch Date: Friday, 10 September, 2010,

[R] adding labels above bars in a barplot

2010-09-10 Thread Antonio Olinto
Hello, I want to make a general routine to draw barplots with numbers plotted above each bar. See the example below. I could not place the numbers on the middle of each bar because I could not calculate the right position of each x-axis tick. axTicks(1) indicated a unitary step, but it

[R] Can't event start 'rattle' under Ubuntu 64bit

2010-09-10 Thread Kamil Sijko
Dear all, I've wanted to give a try to the rattle GUI for R. After long struggle with dependencies I've finally managed to install rattle and all of its dependencies, although for some of them I've been forced to use cran2deb. And now all I get is: library(rattle) Loading required package: pmml

Re: [R] Axis break with gap.plot()

2010-09-10 Thread Filoche
Thank Jim for your answer. I actually did my own function to plot with the loess. I just calculated the intersection between the first and second horizontal gap lines with the line formed by the 2 points before and after the gap. So I can now plot the loess from both sides of the gap section.

[R] Data Manipulation

2010-09-10 Thread dfong
Hi, I just started using R and need some guidance. I need to create a time series chart in R, but the problem is the data is not numeric. The data is in the following format Study A A B B B A C C D Then there is also another column with dates. How can I manipulate this in order to have

Re: [R] Problem importing square character

2010-09-10 Thread Marcelo Estácio
Duncan, thanks for your answer. I tried this: con-file(C:\\Documents and Settings\\mgoncalves\\Desktop\\Tábua IFPD\\200701_02_03_04\\200701_02_03_04.txt,open=rb)

Re: [R] Data Manipulation

2010-09-10 Thread Joshua Wiley
Hi, Look at the table() function. Here is an example with your data: dat - read.table(textConnection( Study A A B B B A C C D), header = TRUE) closeAllConnections() table(dat) Hope that helps, Josh On Fri, Sep 10, 2010 at 8:53 AM, dfong df...@medicine.umaryland.edu wrote: Hi, I just

Re: [R] Data Manipulation

2010-09-10 Thread dfong
I'm actually importing it from a CSV, so I already have that in a table. But i Can't make a graph with text. I assume I need to do some counting in order to draw the graph? Any example of this? thanks -- View this message in context:

[R] for loop help please!

2010-09-10 Thread alfredo
Hi Everyone, I have a 2-dim data.matrix(e.g., table1) in which row1 specifies a range of values. row2 - rown specify the number of times I want to replicate each corresponding value in row1. I can do this with the following function: rep(c(table1[1,]),c(table1[X,])) #where X would go from 2 -

Re: [R] Data Manipulation

2010-09-10 Thread Joshua Wiley
Hi, Yes, the table() function is not to read the data, but to do the frequency counts of each level. I just included the read.table() part so that you could copy and paste my code, but I did not include the R output from table(dat). table(dat) dat A B C D 3 3 2 1 It nicely tallies for you.

Re: [R] Data Manipulation

2010-09-10 Thread Erik Iverson
Hello, This is definitely possible with R, there a lots of package to make good graphics. However, the easiest way for us to help you is if you give us a small reproducible example, as you started to with your initial post. If you have an object in your R session that you'd like help with you

Re: [R] for loop help please!

2010-09-10 Thread Joshua Wiley
Hi A, Here is a little example that I believe does what you want. I am not quite sure how you want all the output in a new matrix, because as you repeat each value is the first row varying numbers of times, you will not have rows of equal length. Although perhaps your data is setup so that you

Re: [R] for loop help please!

2010-09-10 Thread Erik Iverson
I do not follow. Could you please provide a small reproducible example of what table1 might look like, and what you want as a result? Surely you don't need a for loop. alfredo wrote: Hi Everyone, I have a 2-dim data.matrix(e.g., table1) in which row1 specifies a range of values. row2 - rown

Re: [R] for loop help please!

2010-09-10 Thread jim holtman
try this: x - matrix(sample(25,25), 5) x [,1] [,2] [,3] [,4] [,5] [1,] 12 24 143 20 [2,] 2175 15 17 [3,] 11 10 22 169 [4,]6 2541 23 [5,]2 198 13 18 # save result in a list result - lapply(2:nrow(x), function(.row){ +

Re: [R] lme, groupedData, random intercept and slope

2010-09-10 Thread array chip
from the output, I think it's both. - Original Message From: John Sorkin jsor...@grecc.umaryland.edu To: r-help@r-project.org Sent: Fri, September 10, 2010 5:25:44 AM Subject: [R] lme, groupedData, random intercept and slope Windows Vista R 2.10.1 Does the following use of

Re: [R] modifying axis labels in lattice panels

2010-09-10 Thread Dennis Murphy
Hi: On Fri, Sep 10, 2010 at 7:16 AM, Markus Loecher markus.loec...@gmail.comwrote: Dear all, I am struggling to modify the axis labels/ticks in a panel provided to xyplot. To begin with, I do not know the equivalent of the xaxt=n directive for panels that would set the stage for no default

Re: [R] lmer fixed effects, SE, t . . . and p

2010-09-10 Thread array chip
But as far as I know, profile() seems to be de-activated in the lme4 package. - Original Message From: Gavin Simpson gavin.simp...@ucl.ac.uk To: John Sorkin jsor...@grecc.umaryland.edu Cc: r-help@r-project.org; Bert Gunter gunter.ber...@gene.com Sent: Fri, September 10, 2010 2:05:37 AM

Re: [R] lmer fixed effects, SE, t . . . and p

2010-09-10 Thread Gavin Simpson
On Fri, 2010-09-10 at 09:51 -0700, array chip wrote: But as far as I know, profile() seems to be de-activated in the lme4 package. It is beta software. The lme4a version of the lme4 package might have had profile re-enabled, IIRC. G - Original Message From: Gavin Simpson

[R] difference of two RData files/environments

2010-09-10 Thread Barry Rowlingson
I just wrote up some code for differencing two .RData files or environments (or one of each). Available from source here: http://www.maths.lancs.ac.uk/~rowlings/R/Ediff/ In its handiest form, running: ediff() will tell you the difference between your working environment and the .RData file

[R] lme4a package loading error

2010-09-10 Thread array chip
Thanks for reminding this. So I found lme4a package from Doug's UserR!2010 presentation folder: http://lme4.r-forge.r-project.org/slides/2010-07-20-Gaithersburg/pkg/ However, after installation, I got the following error message when trying to load the library: library(Matrix) library(Rcpp)

[R] filter a tab delimited text file

2010-09-10 Thread Duke
Hi all, I have to filter a tab-delimited text file like below: GeneNamesvalue1value2log2(Fold_change) log2(Fold_change) normalizedSignature(abs(log2(Fold_change) normalized) 4) ENSG0209350435-3.81131293562629-4.14357714689656TRUE ENSG0177133

Re: [R] for loop help please!

2010-09-10 Thread Dennis Murphy
Hi: It's not immediately clear what you have in mind, as others have noted, but here are a couple of ideas that seem as though they may apply to your problem, as dangerous as it is to play clairvoyant: I'm using vectors instead of a matrix, but the first vector, val, contains the values whereas

Re: [R] adding labels above bars in a barplot

2010-09-10 Thread Greg Snow
See this message and the replies to it (and the replies to the replies, etc.): http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html In there is a discussion of why you don't really want to do that along with better alternatives and examples of the improved plots. -- Gregory (Greg) L.

Re: [R] filter a tab delimited text file

2010-09-10 Thread Phil Spector
Duke - One possibility is to check the help files for the functions involved to see if there are options to control this behaviour. For example, the check.names= argument to read.table, or the quote= argument to write.table. How about expFC - read.table(test.txt, header=TRUE, sep=\t,

Re: [R] lme4a package loading error

2010-09-10 Thread Gavin Simpson
On Fri, 2010-09-10 at 10:23 -0700, array chip wrote: Thanks for reminding this. So I found lme4a package from Doug's UserR!2010 presentation folder: http://lme4.r-forge.r-project.org/slides/2010-07-20-Gaithersburg/pkg/ What is wrong with the one on the packages tab of the lme4 project page:

Re: [R] boxplot knowing Q1, Q3, median, upper and lower whisker value

2010-09-10 Thread Peng, C
x=1:16 S=summary(x) S Min. 1st Qu. MedianMean 3rd Qu.Max. 1.004.758.508.50 12.25 16.00 S[-4] Min. 1st Qu. Median 3rd Qu.Max. 1.004.758.50 12.25 16.00 par(mfrow=c(1,2)) boxplot(S[-4]) # based on the summarized stats boxplot(x)

[R] adding zeroes after old zeroes in a vector ??

2010-09-10 Thread skan
Hello Imagine I have a vector with ones and zeroes I write it compactly: 011100101 I need to get a new vector replacing the N ones following the zeroes to new zeroes. For example for N = 3 011100101 becomes

Re: [R] boxplot knowing Q1, Q3, median, upper and lower whisker value

2010-09-10 Thread Greg Snow
For base graphics the bxp function does the actual plotting given the statistics. -- 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.org [mailto:r-help-boun...@r-

Re: [R] modifying axis labels in lattice panels

2010-09-10 Thread Markus Loecher
Thanks a lot for this incredibly helpful and thorough reply. I had actually meant to cut out the scales part before sending the email, very sorry about the confusion, so I was actually executing just xyplot(Comp ~ time | PC ,data = Xlong, pane1l = WeekhourPanel) The scales part was a later

Re: [R] filter a tab delimited text file

2010-09-10 Thread Duke
Hi Phil, On 9/10/10 1:45 PM, Phil Spector wrote: Duke - One possibility is to check the help files for the functions involved to see if there are options to control this behaviour. For example, the check.names= argument to read.table, or the quote= argument to write.table. How about

Re: [R] boxplot knowing Q1, Q3, median, upper and lower whisker value

2010-09-10 Thread William Dunlap
is.nan(bd.coerce(as.bdVector(c(1.0, N -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Brian Diggs Sent: Thursday, September 09, 2010 12:41 PM To: David A. Cc: R-help Subject: Re: [R] boxplot knowing Q1, Q3, median,upper and

[R] ggplot bar geom: control the filling in the colour legend

2010-09-10 Thread Benoit Boulinguiez
Hi all, Is it possible to change the filling of the squares used to represent the colour legend in a bar plot with ggplot? in this example, fillings are raven black, I'd like them white. ggplot(diamonds, aes(clarity, colour = cut)) + geom_bar() Regards -- - Benoit Boulinguiez

Re: [R] adding labels above bars in a barplot

2010-09-10 Thread Dennis Murphy
Hi: To add to Greg's sound advice, if you want to put the numbers on top of the bars, why bother with the numerical scale? The entire point of a scale is to provide a reference for comparing different (sets of) values. \begin{rant} And when I see things like this: dat.bar VAR1

Re: [R] adding labels above bars in a barplot

2010-09-10 Thread John Kane
Are you trying to say that you don't really like barplots? At least the OP did not ask for error bars as well. :) --- On Fri, 9/10/10, Dennis Murphy djmu...@gmail.com wrote: From: Dennis Murphy djmu...@gmail.com Subject: Re: [R] adding labels above bars in a barplot To: Antonio Olinto

Re: [R] ggplot bar geom: control the filling in the colour legend

2010-09-10 Thread Ista Zahn
Sure, just change the color of the fill. ggplot(diamonds, aes(clarity, colour = cut)) + geom_bar(fill=white) -Ista On Fri, Sep 10, 2010 at 2:24 PM, Benoit Boulinguiez benoit.boulingu...@ensc-rennes.fr wrote: Hi all, Is it possible to change the filling of the squares used to represent the

[R] Maximum log likelihood estimates of the parameters of a nonlinear model.

2010-09-10 Thread Odette Gaston
Dear all, Is it possible to generate AIC or something equivalent for nonlinear model estimated based on maximum log likelihood l in R? I used nls based on least squares to estimate, and therefore I cannot assess the quality of models with AIC. nlme seems good for only mixed models and mine is not

Re: [R] filter a tab delimited text file

2010-09-10 Thread Gabor Grothendieck
On Fri, Sep 10, 2010 at 1:24 PM, Duke duke.li...@gmx.com wrote:  Hi all, I have to filter a tab-delimited text file like below: GeneNames    value1    value2    log2(Fold_change)  log2(Fold_change) normalized    Signature(abs(log2(Fold_change) normalized) 4) ENSG0209350    4    35    

Re: [R] Simulation

2010-09-10 Thread Greg Snow
Do you need a table with an odds ratio exactly equal to 3 (or other value), or a realistic sample from a population with odds ratio 3 where the sample table will have a different OR (but the various tables will cluster around the true value)? -- Gregory (Greg) L. Snow Ph.D. Statistical Data

Re: [R] adding zeroes after old zeroes in a vector ??

2010-09-10 Thread jim holtman
Not sure how you handle the ending sequence of '0101'; here is one approach: x - 011100101 gsub(0111, , x) [1] 000100101 x [1] 011100101 For the final one, you could

Re: [R] Can't event start 'rattle' under Ubuntu 64bit

2010-09-10 Thread Johan Nyberg
Error: attempt to apply non-function In addition: Warning message: In method(obj, ...) : Invalid object type `GtkFrame' Rattle timestamp (for the error above): 2010-09-10 17:24:14 Ditto in Debian testing i386 32 bit. Johan Nyberg __

Re: [R] OT: model diagnostics in the published literature

2010-09-10 Thread Greg Snow
My experience is that most medical journals (and probably others as well, but I am most familiar with the medical journals) have word or page limits on articles. Diagnostic plots and tests that just show you what you expected and say that it is ok to use your model are not exciting enough to

Re: [R] adding zeroes after old zeroes in a vector ??

2010-09-10 Thread Dennis Murphy
Hi: Try the following: f - function(x, n) { r - rle(x) t1 - cumsum(r$lengths)[r$values == 0L] + 1 repl - as.vector(mapply(seq, t1, t1 + n - 1)) replace(x, repl, 0) } f(x, 3) HTH, Dennis On Fri, Sep 10, 2010 at 10:51 AM, skan juanp...@gmail.com wrote: Hello Imagine I have a

Re: [R] Maximum log likelihood estimates of the parameters of a nonlinear model.

2010-09-10 Thread Ben Bolker
Odette Gaston odette.gaston at gmail.com writes: Dear all, Is it possible to generate AIC or something equivalent for nonlinear model estimated based on maximum log likelihood l in R? I used nls based on least squares to estimate, and therefore I cannot assess the quality of models with

Re: [R] adding zeroes after old zeroes in a vector ??

2010-09-10 Thread skan
Hi I'll study your answers. I could also try gsub(01, 00, x) N times but it could be very slow if N is large In fact when I wrote 10011I mean a vector 1 1 1 1 1 0 0 1 1 not a string, but I wrote it more compactly. I also could by shifting the elements of the vector one position and

[R] Counting occurances of a letter by a factor

2010-09-10 Thread Davis, Brian
I'm trying to find a more elegant way of doing this. What I'm trying to accomplish is to count the frequency of letters (major / minor alleles) in a string grouped by the factor levels in another column of my data frame. Ex. DF-data.frame(c(CC, CC, NA, CG, GG, GC), c(L, U, L, U, L, NA))

Re: [R] lmer output

2010-09-10 Thread Ben Bolker
Denis.Aydin at unibas.ch writes: I have a question regarding an output of a binomial lmer-model. The model is as follows: lmer(y~diet * day * female + (day|female),family=binomial) A reproducible example would always be nice. The corresponding output is: Generalized linear mixed model

  1   2   >