Re: [R] Plot Mixtures of Synthetically Generated Gamma Distributions

2008-07-07 Thread Stephen Tucker
Are you trying to look at the difference in the gamma distributions due to variations in the shape and scale parameters? In this case, the following approach might be more straightforward: ## assign parameter values params - list(curve1=c(1,1),curve2=c(1,2),curve3=c(1,3)) ## define function

Re: [R] Method for checking automatically which distribtions fits a data

2008-07-07 Thread Stephen Tucker
I don't know that there is a single function, but you can perhaps apply a sequence of available functions - For instance, you can use fitdistr() in library(MASS) to estimate optimal parameters for a candidate set of distributions; then look at each fit and also compare the deviance among the

Re: [R] How can i do an automatic upgrade of R 2.5.1 to R 2.7.1

2008-07-07 Thread Paul Hiemstra
Hi Jason, From your last e-mail I understood that you use Ubuntu, but it would help if you mentioned that. But enough comments from me, to a constructive answer :). To get access to the most recent versions of R and a selection of the packages you can add CRAN as a debian repository.

Re: [R] Error in defining function

2008-07-07 Thread Megh Dal
You will have to translate each character string to a function separately. Here I have a modified program : library(zoo) Z.index - as.Date(sample(12450:15500, 3000)) Z.data - matrix(rnorm(300), ncol = 1) data1 - zoo(Z.data, Z.index) fnc = function(data1) { selection2 =

Re: [R] How can i do an automatic upgrade of R 2.5.1 to R 2.7.1

2008-07-07 Thread Paul Hiemstra
...in addition. These are the lines in my sources.list for CRAN: deb http://cran.at.r-project.org/bin/linux/debian etch-cran/ deb-src http://cran.at.r-project.org/bin/linux/debian etch-cran/ This repository holds R 2.7.1. cheers, Paul Jason Lee schreef: Hi, I am aware this is somehow FAQ

[R] GLM, LMER, GEE interpretation

2008-07-07 Thread Daniel Malter
Hi, my dependent variable is a proportion (prob.bind), and the independent variables are factors for group membership (group) and a covariate (capacity). I am interested in the effects of group, capacity, and their interaction. Each subject is observed on all (4) levels of capacity (I use capacity

Re: [R] How can i do an automatic upgrade of R 2.5.1 to R 2.7.1

2008-07-07 Thread Paul Hiemstra
and ofcourse (if using ubuntu) you need the ubuntu CRAN repository as Dirk Eddelbuettel suggested and not the debian as I suggested. sorry. Paul Jason Lee schreef: Hi, I am aware this is somehow FAQ question but I ve been searching from R-cran archive about the related matter and could not

Re: [R] Hmisc latex: table column width

2008-07-07 Thread Lauri Nikkinen
Frank Harrell gave me a hint: http://biostat.mc.vanderbilt.edu/twiki/pub/Main/StatReport/latexFineControl.pdf but I'm still puzzled. Now I do know how to modify e.g cell colors in a table (see below) but I still know how to modify the width parameter of the column. Can anyone give a helping

[R] Change language in Rcmdr

2008-07-07 Thread Schleuh
Hello every R-User, I would like to translate Rcmdr menu items to French (by example). How can I do it ? Thanks for all. -- View this message in context: http://www.nabble.com/Change-language-in-Rcmdr-tp18312496p18312496.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] How can i do an automatic upgrade of R 2.5.1 to R 2.7.1

2008-07-07 Thread Thibaut Jombart
Dear Jason, I don't know if this interests you, but one thing you might want to do while 'upgrading' (in fact it is just a new installation) is re-install all the packages that were installed on your previous R version. I made a small script to do so: ### reinst.pack - function(pathToOldR){

[R] How can I optimize this piece of code ?

2008-07-07 Thread Daren Tan
Currently it needs 50+ mins to run on a 80 rows. I need to run it hundreds of times :P t(apply(unique_ids, 1, function(x) { sd(subset(m[, 5:20], m[,ID] == x)) } )) _ [[alternative HTML version deleted]]

[R] indicating significant differences in boxplots

2008-07-07 Thread Sebastian Merz
Hi all! Writing a paper using a lot of boxplots I was asked to mark the significant differences between plotted groups using stars on top. These stars are found freqeuntly in medical papers and printed above boxplots when there is a significant difference (usually using a bar to indicate which

Re: [R] How can I optimize this piece of code ?

2008-07-07 Thread ONKELINX, Thierry
Try aggregate. It takes only 8 seconds for the 80 rows in the example below. m - as.data.frame(matrix(rnorm(1600), ncol = 20)) m$ID - rbinom(nrow(m), 10, prob = 0.5) system.time( aggregate(m[, 5:20], list(ID = m$ID), sd) ) user system elapsed 6.141.377.55 HTH,

[R] spatial statistics and matrix algebra

2008-07-07 Thread Paulo Cardoso
Can R perform matrix algebra between ascii converted Esri grids? Possible yes. The question is a little more complex (from my point of view and inexperience): I'm interested in perform cost surface and distance surface analysis avoiding ArcGIS tools. Maybe R can deal with grid formatted as

[R] Howto Initialize Parameter of Gamma Mixture Densities for EM

2008-07-07 Thread Gundala Viswanath
Hi all, Is there any reasonable way to initialize the gamma parameters for maximum likelihood estimation using EM. Any advice, pointer to paper URLs are greatly appreciated. Some people mention this can be done by drawing mixing proportions from Dirichlet distribution. But that is vague for me

[R] one-site competition data // curve fitting

2008-07-07 Thread Thiemo Schreiber
Hello everyone, I have biological data from a competition experiment where a free ligand is titrated against the binding of a protein. Now, I would like to fit a standard on-site binding curve to this data in order to obtain the IC50 and Kd values. Unfortunately I have not been able to find a

Re: [R] RES: Need ideas on how to show spikes in my data and how to codeit in R

2008-07-07 Thread Thomas Frööjd
Hi Try changing for(i in 1:250){ jpeg(filename = graf01.jpg, width = 1024, height = 1024, to for(i in 1:250){ jpeg(filename = paste(graf, i, .jpg, sep=), width = 1024, height = 1024, I think that should work, otherwise read up on the paste() function at

Re: [R] Change language in Rcmdr

2008-07-07 Thread Duncan Murdoch
Schleuh wrote: Hello every R-User, I would like to translate Rcmdr menu items to French (by example). How can I do it ? The web page http://developer.r-project.org/Translations.html describes what needs to be done. You should definitely contact the package author (John Fox) first,

Re: [R] Error in defining function

2008-07-07 Thread Gabor Grothendieck
The new code you posted has introduced two more bugs yet again. Before posting again run your code in the debugger issuing this command prior to testing fnc: debug(fnc) and then single step through the code. That way you can find your own bugs. See ?debug You can source aggregate.zoo from

Re: [R] Change language in Rcmdr

2008-07-07 Thread Philippe Grosjean
Hello, As far as I know, Rcmdr is already translated in French. It is thus just a question of switching R to French. Best, Philippe Grosjean Duncan Murdoch wrote: Schleuh wrote: Hello every R-User, I would like to translate Rcmdr menu items to French (by example). How can I do it ?

Re: [R] indicating significant differences in boxplots

2008-07-07 Thread Jim Lemon
On Mon, 2008-07-07 at 11:19 +0200, Sebastian Merz wrote: Hi all! Writing a paper using a lot of boxplots I was asked to mark the significant differences between plotted groups using stars on top. These stars are found freqeuntly in medical papers and printed above boxplots when there is

Re: [R] Exception Handling

2008-07-07 Thread jim holtman
It is probably not too difficult to do. You put the code that might fail inside a try({...}) and then test for failure. If it fails, you can send an email and then continue to the next file. The actual code would be dependent on where the error(s) might be occurring and what you want to do on

[R] Sorting a list

2008-07-07 Thread tolga . i . uzuner
Dear R Users, A bit of a simple question, but I could not find the answer thru google (sorting lists r cran,how can i sort a list r cran) or RSiteSearch... how can I sort a list ? One imagines something like sort.list would do the job, but that's not the one. foo-list(a=10,b=2,c=3)

Re: [R] Bland-Altman method to measure agreement with repeated measures

2008-07-07 Thread Nutter, Benjamin
The function given below is one I've written to handle repeated measures. I've also included the Help File. If you happen to see any potential improvements, I would be open to suggestions. ### ### Function Code ### 'Bland.Altman' - function(x,y,alpha=.05,rep.meas=FALSE,subject,...){

Re: [R] Sorting a list

2008-07-07 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: Dear R Users, A bit of a simple question, but I could not find the answer thru google (sorting lists r cran,how can i sort a list r cran) or RSiteSearch... how can I sort a list ? One imagines something like sort.list would do the job, but that's not the one.

Re: [R] Sorting a list

2008-07-07 Thread milton ruser
foo[sort.list(unlist(foo))] may help you, but I think that this is not your final solution. Cheers, miltinho astronauta brazil On 7/7/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear R Users, A bit of a simple question, but I could not find the answer thru google (sorting lists r

Re: [R] cross-validation in rpart

2008-07-07 Thread Terry Therneau
-- begin included message I'm having a problem with custom functions in rpart, and before I tear my hair out trying to fix it, I want to make sure it's actually a problem. It seems that, when you write custom functions for rpart (init, split and eval) then rpart no longer cross-validates the

Re: [R] Change language in Rcmdr

2008-07-07 Thread John Fox
Dear Schleuh and Duncan, The Rcmdr package does make provision for translation and in fact includes translations from English into 10 other language. Philippe is being modest, since he is the French translator. Regards, John -- John Fox, Professor Department of

Re: [R] Test for multiple comparisons: Nonlinear model, autocorrelation?

2008-07-07 Thread J S
Thanks for your help and suggestions. That’s exactly what I did, i.e. a sin () and cos () code using daily observations of soil temperature, and putting a variable “vegetation types” as a covariate. Therefore, I can build contrasts to compare parameters of the model such as an intercept,

Re: [R] Hi~problem with the two sample test: ks2Test in the package of fbasics

2008-07-07 Thread Ben Bolker
l y pligly at gmail.com writes: Hi everyone, when I use the two sample Kolmogorov¨CSmirnov ks2Test like this: x=read.table(e:/x.txt) y=rstable(1000,alpha,beta,gamma,delta) I alway get results as follows: Warning messages: [snip] Strangely,I got a total same result! I really want to

[R] A quick question about lm()

2008-07-07 Thread rlearner309
I have a simple regression using lm(). If I just want to check the coefficient, I can use summary(lm())$coef; if I need the standard error, I can use summary(lm())$s, if I need the residuals, I can use summary(lm())$res. OK. How can I get the R-squares and Adjusted R-squares using $...? Is

Re: [R] A quick question about lm()

2008-07-07 Thread Henrique Dallazuanna
If I understand correctly, try: names(summary(lm(...))) On Mon, Jul 7, 2008 at 10:38 AM, rlearner309 [EMAIL PROTECTED] wrote: I have a simple regression using lm(). If I just want to check the coefficient, I can use summary(lm())$coef; if I need the standard error, I can use summary(lm())$s,

Re: [R] A quick question about lm()

2008-07-07 Thread ONKELINX, Thierry
Or str(summary(lm(..))) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and

Re: [R] A quick question about lm()

2008-07-07 Thread Ted Harding
PS: I forgot to mention that, since the summary() of an lm() object is created by the function summary.lm(), you can find out the detail by looking under Value: at ?summary.lm Ted. On 07-Jul-08 14:28:23, Ted Harding wrote: On 07-Jul-08 13:38:12, rlearner309 wrote: I have a simple

Re: [R] A quick question about lm()

2008-07-07 Thread Tobias Verbeke
rlearner309 wrote: I have a simple regression using lm(). model - lm(dist ~ speed, data = cars) sModel - summary(model) If I just want to check the coefficient, I can use summary(lm())$coef; if I need the standard error, I can use summary(lm())$s, if I need the residuals, It is

Re: [R] Method for checking automatically which distribtions fits a data

2008-07-07 Thread hadley wickham
Suppose I have a vector of data. Is there a method in R to help us automatically suggest which distributions fits to that data (e.g. normal, gamma, multinomial etc) ? - Gundala Viswanath Jakarta - Indonesia See https://stat.ethz.ch/pipermail/r-help/2008-June/166259.html for example,

[R] Running all possible subsets of a GLM (binomial) model

2008-07-07 Thread Eric Vander Wal
I have spent a fair amount of time looking for a package that is automated to run glm (binomial) regression models with all possible subsets of my independent variables. Something akin to Lumley's leaps package, but can be applied to glms, not just lms; or something similar to Stata's brute force

Re: [R] Exception Handling

2008-07-07 Thread Paul Gilbert
I do this kind of thing under control of make. If you organize the individual pieces as separate targets then make -k will keep going and make -j can be used to run things in parallel. R can be made to throw an error with something like this: egTarget: @$(MKDIR) $(FLAGS)

[R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread hadley wickham
Hi All, I'm trying trying to draw a colour wheel (a slice of hcl space) in R. Running the code below doesn't give me what I expect - there's some oddly bright colours of the wrong hue around c(0, 0) and I see three coloured circles (a small magenta, a medium sized yellow and a large cyan). Am I

[R] Plot depends on conditions

2008-07-07 Thread mysimbaa
Dear R users, I want to do some plots which depends on conditions (7 conditions) I had collected all the conditions in a vector Cond(c1,c2,c3,c4,c5,c6,c7) All the conditions are logic (TRUE/FALSE). If c1 or c2 are FALSE I want to have only one Plot. Then I want to have a break (something like

Re: [R] lwd gives different plotted line widths for Vertical and horizontal Lines when lwd= 2?

2008-07-07 Thread hadley wickham
Hi Pedro, Hmm, that's probably a bug in the way that ggplot2 is drawing the lines. The good news is that the next version of ggplot has a much more flexible theming system, so to get the same effect as your grid code, all you'll need to do is: theme_set(axis.line = theme_segment(colour = black)

Re: [R] L1 nonlinear approximation

2008-07-07 Thread Greg Snow
The lasso2 and lars packages use l1 constraints in their routines. Depending on what you are trying to accomplish, they may do what you want, or looking at their code could give additional ideas. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] Method for checking automatically which distribtions fits a data

2008-07-07 Thread David Reinke
The function ks.test(x,y, ...) performs a Kolmogorov-Smirnov test on a set of sample values x against a distribution y. Both x and y must be cumulative distributions; y can be either a vector of cumulative values or a predefined distribution such as pnorm(). David Reinke Senior Transportation

Re: [R] Plot depends on conditions

2008-07-07 Thread jim holtman
It sounds like an IF-THEN-ELSE should do the job. What happens in the c1 c4 are FALSE, or some other combination? Is your description the priority order that the tests are to be done in? On Mon, Jul 7, 2008 at 10:45 AM, mysimbaa [EMAIL PROTECTED] wrote: Dear R users, I want to do some

Re: [R] Method for checking automatically which distribtions fits a data

2008-07-07 Thread Frank E Harrell Jr
David Reinke wrote: The function ks.test(x,y, ...) performs a Kolmogorov-Smirnov test on a set of sample values x against a distribution y. Both x and y must be cumulative distributions; y can be either a vector of cumulative values or a predefined distribution such as pnorm(). David Reinke

Re: [R] Running all possible subsets of a GLM (binomial) model

2008-07-07 Thread hadley wickham
On Mon, Jul 7, 2008 at 10:18 AM, Eric Vander Wal [EMAIL PROTECTED] wrote: I have spent a fair amount of time looking for a package that is automated to run glm (binomial) regression models with all possible subsets of my independent variables. Something akin to Lumley's leaps package, but can

Re: [R] Running all possible subsets of a GLM (binomial) model

2008-07-07 Thread Ben Bolker
Eric Vander Wal ejvander at lakeheadu.ca writes: I have spent a fair amount of time looking for a package that is automated to run glm (binomial) regression models with all possible subsets of my independent variables. Something akin to Lumley's leaps package, but can be applied to glms,

Re: [R] Relative Mortality Risk second part

2008-07-07 Thread Terry Therneau
so, someone know where can I find the data.mgus dataset and the data.mgus? This data set are used in the : Robert A. Kyle, Terry M. Therneau, S. Vincent Rajkumar, Janice R. Offord, Dirk R. Larson, Matthew F. Plevak, and L. Joseph Melton III. A long-term study of prognosis in monoclonal

Re: [R] GLM, LMER, GEE interpretation

2008-07-07 Thread Ben Bolker
Daniel Malter daniel at umd.edu writes: Hi, my dependent variable is a proportion (prob.bind), and the independent variables are factors for group membership (group) and a covariate (capacity). I am interested in the effects of group, capacity, and their interaction. Each subject is

[R] A shorter version of .Last.value?

2008-07-07 Thread Jon Zadra
Hi, There is an object, .Last.value to which the result of the most recent evaluation is assigned. This is similar to ans in Matlab. In Matlab ans can be very useful and time-saving, but typing the larger R version is somewhat clunky and takes away from the usefulness. Is it possible to

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread Earl F. Glynn
hadley wickham [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] there's some oddly bright colours of the wrong hue around c(0, 0) and I see three coloured circles (a small magenta, a medium sized yellow and a large cyan). Am I doing something wrong or is there a bug in the hcl

[R] Colour clusters in a 2d plot

2008-07-07 Thread Josep Maria Campanera Alsina
R experts, I have three columns. c1 and c2 are numeric variables whereas c3 are the clusters classes (nominal variable, 10 different: cluster1, cluster2, cluster3, cluster4, cluster5 ). I'd like to plot c1 against c2 (easy!) in a 2D plot and put different color depending to the cluster class

Re: [R] A shorter version of .Last.value?

2008-07-07 Thread Peter Dalgaard
Jon Zadra wrote: Hi, There is an object, .Last.value to which the result of the most recent evaluation is assigned. This is similar to ans in Matlab. In Matlab ans can be very useful and time-saving, but typing the larger R version is somewhat clunky and takes away from the usefulness.

Re: [R] A shorter version of .Last.value?

2008-07-07 Thread Gabor Grothendieck
Try this: makeActiveBinding(ans, function() .Last.value, .GlobalEnv) NULL yy - 3 ans [1] 3 On Mon, Jul 7, 2008 at 2:03 PM, Jon Zadra [EMAIL PROTECTED] wrote: Hi, There is an object, .Last.value to which the result of the most recent evaluation is assigned. This is similar to ans in

Re: [R] A shorter version of .Last.value?

2008-07-07 Thread Peter Dalgaard
Gabor Grothendieck wrote: Try this: makeActiveBinding(ans, function() .Last.value, .GlobalEnv) NULL yy - 3 ans [1] 3 OK, you win. AND Luke won't kill you because he wrote that stuff... -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ ---

Re: [R] Colour clusters in a 2d plot

2008-07-07 Thread Jorge Ivan Velez
Dear Josep, Does it do the work for you? # Example data set.seed(123) mydata=data.frame(c1=rnorm(100),c2=rnorm(100),cluster=sample(1:10,100,replace=TRUE)) attach(mydata) # Plot plot(c1,c2,col=cluster,pch=16,xlab=Your legend here,ylab=Your legend here) HTH, Jorge On Mon, Jul 7, 2008 at 1:51

Re: [R] GLM, LMER, GEE interpretation

2008-07-07 Thread ctu
I agree with Ben. Theoretically, Laplace (lmer) provides a better approximation. Chunhao Quoting Ben Bolker [EMAIL PROTECTED]: Daniel Malter daniel at umd.edu writes: Hi, my dependent variable is a proportion (prob.bind), and the independent variables are factors for group membership

[R] Interest in a Use R Group in San Francisco area?

2008-07-07 Thread Jim Porzak
All, Tuesday week (July 15th) Mike Driscoll I will be presenting A Gentle Introduction to R and its Applications in Business Intelligence at the SDForum Business Intelligence SIG in Palo Alto, California. One motivation is to judge interest in starting a Use R Group in the Bay Area. We will

Re: [R] Interest in a Use R Group in San Francisco area?

2008-07-07 Thread Marc Schwartz
on 07/07/2008 01:42 PM Jim Porzak wrote: All, Tuesday week (July 15th) Mike Driscoll I will be presenting A Gentle Introduction to R and its Applications in Business Intelligence at the SDForum Business Intelligence SIG in Palo Alto, California. One motivation is to judge interest in starting

Re: [R] Interpreting messages when building packages

2008-07-07 Thread Johannes Huesing
The earlier messages suggest that you have automatically produced help files (from package.skeleton) and haven't edited them. I'd suggest moving them to a temporary directory until you're ready to edit them properly. ok, that get's me a little bit closer to a minimal working example as

[R] subset() multiple arguments

2008-07-07 Thread stephen sefick
This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have to subset a subset of a subset? d-subset(subset(subset(subset(x, River.Mile=202), River.Mile3), Lagrangian==Yes), EventType==Regular) Stephen -- Let's not spend our time and resources

Re: [R] Interpreting messages when building packages

2008-07-07 Thread Duncan Murdoch
You didn't say how you were doing the install, but the directory name looks like one that was used by R CMD check (.../dynalc.Rcheck/dynalc). Are you trying to install from a directory created by it? You should normally install from your original source directory. Duncan Murdoch On

Re: [R] subset() multiple arguments

2008-07-07 Thread Henrique Dallazuanna
Try this: d- subset(x, River.Mile = 202 River.Mile 3 Langrangian == Yes EventType == Regular) On Mon, Jul 7, 2008 at 4:19 PM, stephen sefick [EMAIL PROTECTED] wrote: This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have

Re: [R] subset() multiple arguments

2008-07-07 Thread Duncan Murdoch
On 7/7/2008 3:19 PM, stephen sefick wrote: This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have to subset a subset of a subset? d-subset(subset(subset(subset(x, River.Mile=202), River.Mile3), Lagrangian==Yes), EventType==Regular) You

Re: [R] Interest in a Use R Group in San Francisco area?

2008-07-07 Thread Peter Dalgaard
Marc Schwartz wrote: R groupies in San Francisco? I have this mental image of a bunch of geeks dressed in tie-dyed shirts, jeans and sandals, sitting on the corner of Haight-Ashbury listening to the Grateful Dead while coding on their laptops. That sounds pretty much like Berkeley when I was

Re: [R] subset() multiple arguments

2008-07-07 Thread Peter Dalgaard
stephen sefick wrote: This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have to subset a subset of a subset? d-subset(subset(subset(subset(x, River.Mile=202), River.Mile3), Lagrangian==Yes), EventType==Regular) Stephen is your friend:

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread hadley wickham
On Mon, Jul 7, 2008 at 1:05 PM, Earl F. Glynn [EMAIL PROTECTED] wrote: hadley wickham [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] there's some oddly bright colours of the wrong hue around c(0, 0) and I see three coloured circles (a small magenta, a medium sized yellow and a

[R] [R-pkgs] Functional Data Analysis, fda_1.2.4

2008-07-07 Thread Spencer Graves
Hi, All: Version 1.2.4 of the Functional Data Analysis (fda) package is now available on CRAN. In this version, both 'smooth.basis' and 'smooth.basisPar' have been modified to make them easier to use. They have more useful defaults and they return an object of class 'fdSmooth', with

Re: [R] Interest in a Use R Group in San Francisco area?

2008-07-07 Thread Marc Schwartz
on 07/07/2008 02:30 PM Peter Dalgaard wrote: Marc Schwartz wrote: R groupies in San Francisco? I have this mental image of a bunch of geeks dressed in tie-dyed shirts, jeans and sandals, sitting on the corner of Haight-Ashbury listening to the Grateful Dead while coding on their laptops.

Re: [R] Interpreting messages when building packages

2008-07-07 Thread Johannes Huesing
Duncan Murdoch [EMAIL PROTECTED] [Mon, Jul 07, 2008 at 09:24:07PM CEST]: You didn't say how you were doing the install, but the directory name looks like one that was used by R CMD check (.../dynalc.Rcheck/dynalc). No, that was an attempt to install during a call to R CMD check. --

Re: [R] Colour clusters in a 2d plot

2008-07-07 Thread hadley wickham
On Mon, Jul 7, 2008 at 12:51 PM, Josep Maria Campanera Alsina [EMAIL PROTECTED] wrote: R experts, I have three columns. c1 and c2 are numeric variables whereas c3 are the clusters classes (nominal variable, 10 different: cluster1, cluster2, cluster3, cluster4, cluster5 ). I'd like to plot

Re: [R] Interpreting messages when building packages

2008-07-07 Thread Johannes Huesing
Duncan Murdoch [EMAIL PROTECTED] [Mon, Jul 07, 2008 at 09:57:50PM CEST]: Does a plain install succeed? No, the error messages look familiar: * Installing to library '/usr/local/lib/R/site-library' * Installing *source* package 'dynalc' ... ** libs WARNING: no source files found chmod: Zugriff

Re: [R] indicating significant differences in boxplots

2008-07-07 Thread John Kane
HI Sebasian, I don't think I have ever seen this type of presentation. Could you provide a reference to a journal article that uses this? It might make it easier to visualize exactly what you want. --- On Mon, 7/7/08, Sebastian Merz [EMAIL PROTECTED] wrote: From: Sebastian Merz [EMAIL

[R] Basic Vector and Matrix Operations

2008-07-07 Thread Eric Turkheimer
I am wondering if it is possible to perform the following two basic functions with primitive R functions. I know I could write functions for either, but it seems as though they are probably built-in somewhere. 1) Fill out a vector to a desired length with missing values or zeros. So,

Re: [R] Basic Vector and Matrix Operations

2008-07-07 Thread Xiaohui Chen
Eric Turkheimer 写道: I am wondering if it is possible to perform the following two basic functions with primitive R functions. I know I could write functions for either, but it seems as though they are probably built-in somewhere. 1) Fill out a vector to a desired length with missing values or

Re: [R] Basic Vector and Matrix Operations

2008-07-07 Thread apjaworski
Here is a solution: 1. c(x, rep(NA, n-length(x))) 2. which(x==2, arr.ind=TRUE) Cheers Andy __ Andy Jaworski 518-1-01 Process Laboratory 3M Corporate Research Laboratory - E-mail: [EMAIL PROTECTED] Tel: (651) 733-6092 Fax: (651) 736-3122 Eric Turkheimer

Re: [R] GLM, LMER, GEE interpretation

2008-07-07 Thread Daniel Malter
Thanks for your answers. I appreciate your help. I tried the glmmML. However, it seems glmmML does not allow for a quasibinomial fit as I did with the models I used. I have large overdispersion which I account for using a quasibinomial with scaling parameter. Further, I have 360 observations - is

Re: [R] Basic Vector and Matrix Operations

2008-07-07 Thread Jorge Ivan Velez
Dear Eric, Try this: # First function f1=function(x,k) c(x,rep(NA,k-length(x))) x-c(3,4,5) f1(x,5) # Second function f2=function(x,val){ res=which(x==val,arr.ind=T) paste(res,collapse=',',sep='') } x-matrix(1:9,ncol=3) f2(x,2) HTH, Jorge On Mon, Jul 7, 2008 at 5:07 PM, Eric Turkheimer

Re: [R] Basic Vector and Matrix Operations

2008-07-07 Thread Erik Iverson
Eric Turkheimer wrote: I am wondering if it is possible to perform the following two basic functions with primitive R functions. I know I could write functions for either, but it seems as though they are probably built-in somewhere. 1) Fill out a vector to a desired length with missing

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread Earl F. Glynn
hadley wickham [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, Jul 7, 2008 at 1:05 PM, Earl F. Glynn [EMAIL PROTECTED] wrote: hadley wickham [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well, I do have fixup = FALSE, which the documentation indicates should

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread Achim Zeileis
Hadley: I'm trying trying to draw a colour wheel (a slice of hcl space) in R. Running the code below doesn't give me what I expect - there's some oddly bright colours of the wrong hue around c(0, 0) and I see three coloured circles (a small magenta, a medium sized yellow and a large cyan). Am

Re: [R] Interest in a Use R Group in San Francisco area?

2008-07-07 Thread Peter Dalgaard
Marc Schwartz wrote: That sounds pretty much like Berkeley when I was there in 2000. I really should get to visit there again and buy some more tie-dyed t-shirts for my nieces We could have useR! 2009 there...that would give you a reason to visit. That would be 2010. Rennes already has

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread hadley wickham
On Mon, Jul 7, 2008 at 4:30 PM, Earl F. Glynn [EMAIL PROTECTED] wrote: hadley wickham [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, Jul 7, 2008 at 1:05 PM, Earl F. Glynn [EMAIL PROTECTED] wrote: hadley wickham [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]

Re: [R] GLM, LMER, GEE interpretation

2008-07-07 Thread Ben Bolker
Daniel Malter daniel at umd.edu writes: Thanks for your answers. I appreciate your help. I tried the glmmML. However, it seems glmmML does not allow for a quasibinomial fit as I did with the models I used. I have large overdispersion which I account for using a quasibinomial with scaling

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread hadley wickham
If you replace this by hcl$colour - hcl(hcl$h, hcl$c, hcl$l, fixup = FALSE) with(hcl, plot(x, y, col=colour, pch=20)) Then, the resulting wheel has three overlapping holes corresponding to the colors previously fixed. Oops, thanks for pointing that out. Also, as hue/chroma correspond to

Re: [R] Drawing a colour wheel - bug in hcl?

2008-07-07 Thread Achim Zeileis
On Mon, 7 Jul 2008, hadley wickham wrote: If you replace this by hcl$colour - hcl(hcl$h, hcl$c, hcl$l, fixup = FALSE) with(hcl, plot(x, y, col=colour, pch=20)) Then, the resulting wheel has three overlapping holes corresponding to the colors previously fixed. Oops, thanks for pointing

Re: [R] Survey questions

2008-07-07 Thread Farley, Robert
I found and loaded the survey package. ?rake and ?postStratify seem promising. Are there other packages/procedures I've missed? Are there online references that an R newbie could use to feel comfortable applying these procedures to a survey? How about a reference discussing the details of

Re: [R] multiplication question

2008-07-07 Thread Moshe Olshansky
The answer to your first question is sum(x)8sum(y) - sum(x*y) and for the second one x %*% R %*% y - sum(x*y*diag(R)) --- On Thu, 3/7/08, Murali Menon [EMAIL PROTECTED] wrote: From: Murali Menon [EMAIL PROTECTED] Subject: [R] multiplication question To: [EMAIL PROTECTED] Received:

[R] question on lm or glm matrix of coeficients X test data terms

2008-07-07 Thread DS
Hi, is there an easy way to get the calculated weights in a regression equation? for e.g. if my model has 2 variables 1 and 2 with coefficient .05 and .6 how can I get the computed values for a test dataset for each coefficient? data var1,var2 10,100 so I want to get .5, 60 back in

Re: [R] question on lm or glm matrix of coeficients X test data terms

2008-07-07 Thread Jorge Ivan Velez
Dear Dhruv, Try this: # data set set.seed(123) X=matrix(rpois(10,10),ncol=2) X [,1] [,2] [1,]8 15 [2,]9 11 [3,] 145 [4,] 104 [5,] 10 13 # outcome t(apply(X,1,function(x,betas){ if(length(x)!=length(betas)) stop(x and betas are of different length!) y=x*betas y

[R] Problems with lm()

2008-07-07 Thread Chibisi Chima-Okereke
Dear all, I am trying to fit a multiple linear regression model to a table of data. My data.frame is like this ... fit.data - data.frame(y, x1, x2, x3, x4, x5, x6), then I use the linea regression command ... lm(formula = y ~ x1 + x2 + x3 + x4 + x5 + x6, data = fit.data) however, for some

Re: [R] Problems with lm()

2008-07-07 Thread Daniel Malter
If that is so, i.e. x1=-x2, then they do not convey different meaning and cannot be estimated. Think about it that way you leave the house 8 hours after midnight. This is identical to saying that you leave the house 16 hours before midnight. This conveys the exact (!) same information and neither

Re: [R] question on lm or glm matrix of coeficients X test data terms

2008-07-07 Thread DS
thanks Jorge. I appreciate your multiple improvements. This still involves hard coding the co-efficients. I wonder if this is what glm and lm are doing. for e.g. m-lm(K~a+b,data=data) m$coefficients would have 0 for all variables except a and b and then R must be multiplying the weights

Re: [R] Basic Vector and Matrix Operations

2008-07-07 Thread jim holtman
For the first case, just extend the vector: x-c(3,4,5) x [1] 3 4 5 x[5] - NA x [1] 3 4 5 NA NA the second would use 'which' On Mon, Jul 7, 2008 at 5:07 PM, Eric Turkheimer [EMAIL PROTECTED] wrote: I am wondering if it is possible to perform the following two basic functions with

[R] list genes w/n a genomic fragment

2008-07-07 Thread runner
Hi, is there any package/function in Bioconductor that can do this: if given the chromosome positions of a fragment, find out all genes within, and with the information about which strand is the sense strand. And vice versa. Thanks a lot. - Appreciate your time attention! -- View this

Re: [R] Interpreting messages when building packages

2008-07-07 Thread Johannes Huesing
This message goes away when I empty the data directory. The problem must be around there. Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 12 did not have 19 elements -- Johannes Hüsing There is something fascinating about science.

Re: [R] list genes w/n a genomic fragment

2008-07-07 Thread Bert Gunter
So Mr.Anoymous, why don't you inquire on the Bioconductor list to find out instead of here? -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of runner Sent: Monday, July 07, 2008 8:59 PM To: r-help@r-project.org Subject: [R] list genes w/n a

[R] odd dnorm behaviour (?)

2008-07-07 Thread Mike Lawrence
#Quick one hopefully. Shouldn't dnorm be returning the pdf? Last time I checked, #a probability shouldn't be greater than 1 as produced by: curve(dnorm(x,0,.1),from=-1,to=t) #Shouldn't I be getting an axis more like that produced by: f=function(x,m,s){ y=rep(NA,length(x))

Re: [R] list genes w/n a genomic fragment

2008-07-07 Thread Martin Morgan
Hi runner... runner [EMAIL PROTECTED] writes: Hi, is there any package/function in Bioconductor that can do this: As Bert says, this should be directed to the Bioconductor mailing list. Let's have any follow-up conversation there. But... if given the chromosome positions of a fragment, find

Re: [R] odd dnorm behaviour (?)

2008-07-07 Thread Moshe Olshansky
dnorm() computes the density, so it may be 1; pnorm() computes the distribution function. --- On Tue, 8/7/08, Mike Lawrence [EMAIL PROTECTED] wrote: From: Mike Lawrence [EMAIL PROTECTED] Subject: Re: [R] odd dnorm behaviour (?) To: Rhelp [EMAIL PROTECTED] Received: Tuesday, 8 July, 2008,

  1   2   >