Re: [R] How to calculate GLM least square means?

2008-08-06 Thread Bill.Venables
Hi Mark, What I always do is to produce a prediction data set and use pv - predict(model, newdata = pdata, se = TRUE) This is pretty straightforward. You just build the data set like pdata - with(oldData, expand.grid(group = levels(group), value = mean(value)) You probably need

Re: [R] Replacing double-quote with backtick

2008-08-06 Thread Uwe Ligges
Gundala Viswanath wrote: Hi, How can I change the back quoted strings below print(x) [1] foo [1] bar into [1]`foo` [2]`bar` Because later I want to access a named list with this string: mylist$`foo` mylist$`bar` I can't do it with: mylist$foo mylist$bar In fact you want to use

Re: [R] Help in running Stata dataset in R

2008-08-06 Thread Prof Brian Ripley
What are use() and des()? Please note the footer of this message. (Are you using package epicalc without telling us?) I suspect that foreign::read.dta is being used. That has argument 'convert.dates', and you could try setting it to FALSE, as the message is from as.Date.character()

[R] increase memory in R

2008-08-06 Thread alessia matano
Dear all, I write you to ask you a suggestion about increasing memory in R. I use a pc with ram of 4gb, and I put in the link of R the following statementes, --max-memory.size=2074M and --max-vsize==500M, as I red in many faq concerning this topic. However, when I run some regression, the program

Re: [R] Statistics on raster pictures - asking for an advice

2008-08-06 Thread Kenn Konstabel
Take a look at packages pixmap and rimage ... and read.picture() in package SoPhy for reading tiff images. Currently there seems to be no way of reading in png files directly, so they need to be converted first. Kenn On Wed, Aug 6, 2008 at 11:47 AM, Tomas Lanczos [EMAIL PROTECTED] wrote:

Re: [R] Opening R from Tinn without setting directory each time

2008-08-06 Thread Philippe Grosjean
Paul Chatfield wrote: Hi - someone has just e-mailed me direct with the answer which it'd be helpful to paste just so future users who have the same issue can see. Just follow the advice below and it works perfectly. Open a command window (Run;cmd) and cd to the bin directory of your R

Re: [R] Statistics on raster pictures - asking for an advice

2008-08-06 Thread Bio7
There a several pure R packages available like EBImage,pixmap,rimage and rgdal (reads images from which you can extract the different bands). I also offer a software which combines ImageJ and R and is capable to transfer images to R and create images from R easily by means of the Rserve

Re: [R] How to calculate GLM least square means?

2008-08-06 Thread John Fox
Dear Mark, The effects package (see the JSS article at http://www.jstatsoft.org/v08/i15/paper) will probably do what you want. I hope this helps, John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web:

[R] Variance-covariance matrix for parameter estimates

2008-08-06 Thread Laura Bonnett
Dear All, I am currently working with the coxph function within the package survival. I have the model h_ij = h_0(t) exp( b1x1 + b 2x2) where the indicator variables are as follows: x1 x2 VPS 0 0 LTG 1 0 TPM 0 1 [[alternative HTML version deleted]]

[R] Problem in using MASS

2008-08-06 Thread tayyaba rafiq
Dear Sir I am very new user of R project. Sir I am a research scholar. I am doing work on fitting distributions. Sir in using MASS package I am facing the following errors for my data. fitdistr(urban$x, gamma)Error in fitdistr(urban$x, gamma) : 'x' must be a non-empty numeric vector

Re: [R] Help in running Stata dataset in R

2008-08-06 Thread Lazarus Mramba
Dear Prof Brian, It is true that i used the epicalc package. The functions use() and des() are from epicalc. The problem does not occur if i use library(foreign) : tmp - read.dta(maltreat.dta, convert.dates=FALSE) sessionInfo() R version 2.7.1 (2008-06-23) i386-pc-mingw32 locale:

[R] Variance-covariance matrix for parameter estimates

2008-08-06 Thread Laura Bonnett
(Sorry, my last email appeared to be missing the important bits so I'll try again!) Dear All, I am currently working with the coxph function within the package survival. I have the model h_ij = h_0(t) exp( b1x1 + b 2x2) where the indicator variables are as follows: x1 x2 A00 B

[R] No y-axis label using png on linux

2008-08-06 Thread Xiaoming Cai
Dear all, I am grateful if anyone provides a solution to my problem of no y-axis label using png on linux. If I use postscript device or X11 device, it is fine. On Windows, it works with png. I have tried different versions of R and none of them works. Best regards, Xiaoming Cai, Dr. School of

Re: [R] Problem in using MASS

2008-08-06 Thread Daniel Malter
Hi, what does your R-prompt show when you just type: urban$x and hit ENTER. The error message suggests that urban$x does not contain any numeric elements. So either it is empty or it contains, for example, a factor-coded (dummy-like) variable. We will probably need more information to help

Re: [R] Opening R from Tinn without setting directory each time

2008-08-06 Thread Gabor Grothendieck
Also note there is a program, Rversions.hta, whose home page is at: http://batchfiles.googlecode.com that will list in a drop down menu all versions of R you have installed, based on the registry information that RSetReg.exe or the R installer sets, allowing you to select which one you wish to

Re: [R] No y-axis label using png on linux

2008-08-06 Thread Gabor Grothendieck
See if using bitmap() in place of png() works. On Wed, Aug 6, 2008 at 8:19 AM, Xiaoming Cai [EMAIL PROTECTED] wrote: Dear all, I am grateful if anyone provides a solution to my problem of no y-axis label using png on linux. If I use postscript device or X11 device, it is fine. On Windows,

[R] mlogit (using multinom) problems

2008-08-06 Thread Wim Bertels
Hallo, i am trying to use the mlogit package (which uses the multinom package according to the documentation) the multinom function works fine: fsex = multinom(country ~ sex, data=included_s_sex_MF) # weights: 66 (42 variable) initial value 8222.172926 iter 10 value 7647.481298 iter 20

[R] Weibull Likelihod function.

2008-08-06 Thread rkevinburton
Is there a likelihod function for the Weibull distribution in 'R'? I found the following reference: http://www.weibull.com/LifeDataWeb/weibull_log_likelihood_functions_and_their_partials.htm But I had a hard time understanding the parameters required Particularly 'number of groups of

Re: [R] write .table

2008-08-06 Thread John Kane
Yes. See the append option in write.table. This is okay for outputing results but you will not be able to use the data in R. --- On Tue, 8/5/08, Rajasekaramya [EMAIL PROTECTED] wrote: From: Rajasekaramya [EMAIL PROTECTED] Subject: [R] write .table To: r-help@r-project.org Received:

Re: [R] Opening R from Tinn without setting directory each time

2008-08-06 Thread bartjoosen
If you first install a newer version of R and aftwards remove a previous version, Tinn-R gives this behaviour. Doesn't matter if you activate the option to register. Best regards Bart Philippe Grosjean wrote: Paul Chatfield wrote: Hi - someone has just e-mailed me direct with the answer

[R] Merging two datasets

2008-08-06 Thread Shreyasee Pradhan
I am facing a problem in merging two datasets. I have given codes to the names which are common in both the datasets and also to those which are uncommon. When I gave gave the following command merge(df1,df2) only those rows and columns were merged which were having common codes. When I viewed

[R] Correlation dichotomous factor, continous (numerical) and ordered factor

2008-08-06 Thread Birgitle
Hello R-User! I appologise in advance if this should also go into statistics but I am presently puzzled. I have a data.frame (about 300 rows and about 80 variables) and my variables are dichotomous factors, continuous (numerical) and ordered factors. I would like to calculate the linear

[R] RES: Merging two datasets

2008-08-06 Thread Leandro Marino
merge(df1,df2,by=commonvar,all=T) Regards, Leandro Marino -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de Shreyasee Pradhan Enviada em: quarta-feira, 6 de agosto de 2008 11:15 Para: r-help@r-project.org Assunto: [R] Merging two datasets I am facing a

Re: [R] Correlation dichotomous factor, continous (numerical) and ordered factor

2008-08-06 Thread Mark Difford
Hi Birgitle, ... my variables are dichotomous factors, continuous (numerical) and ordered factors. ... Now I am confused what I should use to calculate the correlation using all my variables and how I could do that in R. Professor Fox's package polycor will do this for you in a very nice

Re: [R] Merging two datasets

2008-08-06 Thread Henrique Dallazuanna
Try using: merge(df1, df2, all = TRUE) On Wed, Aug 6, 2008 at 11:15 AM, Shreyasee Pradhan [EMAIL PROTECTED] wrote: I am facing a problem in merging two datasets. I have given codes to the names which are common in both the datasets and also to those which are uncommon. When I gave gave the

[R] Font size in plots (I do NOT understand par help)

2008-08-06 Thread Stephane Bourgeois
Hi, I do not get how par works, help please. Let's say I have a simple plot: plot(1:10) I want to change the font size for the x axis... how do I do that? Thank you, Stephane -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity

[R] Weighted multivariate regression

2008-08-06 Thread Zhang Yanwei - Princeton-MRAm
Hi all, I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify

Re: [R] Opening R from Tinn without setting directory each time

2008-08-06 Thread Keith Jewell
Hi, See http://sourceforge.net/forum/forum.php?thread_id=1741502forum_id=481901 I'm running under Windows Server 2003, Standard x64 Edition and (I think) I can't make any system wide registry changes. In my R installation there are (I think) no relevant registry entries. I think that may be

Re: [R] Correlation dichotomous factor, continous (numerical) and ordered factor

2008-08-06 Thread Birgitle
Many, many thanks that was fast and exactly what I was looking for. B. Mark Difford wrote: Hi Birgitle, ... my variables are dichotomous factors, continuous (numerical) and ordered factors. ... Now I am confused what I should use to calculate the correlation using all my variables

Re: [R] Font size in plots (I do NOT understand par help)

2008-08-06 Thread Peter Dalgaard
Stephane Bourgeois wrote: Hi, I do not get how par works, help please. Let's say I have a simple plot: plot(1:10) I want to change the font size for the x axis... how do I do that? Well, you start by reading help(par) multiple times, and then play around Start with, e.g.

Re: [R] Font size in plots (I do NOT understand par help)

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Stephane Bourgeois wrote: Hi, I do not get how par works, help please. Let's say I have a simple plot: plot(1:10) I want to change the font size for the x axis... how do I do that? You mean of the tick labels (as distinct from the ylab)? Look at plot(1:10,

Re: [R] Help in running Stata dataset in R

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Prof Brian Ripley wrote: Your examples work for me via read.dta() and via use(), including the Date columns, with the current foreign_0.8-28. They also work on Windows 2.7.1 with foreign_0.8-26. As far as I can see the only relevant part of read.dta is

Re: [R] Font size in plots (I do NOT understand par help)

2008-08-06 Thread Dan Davison
On Wed, Aug 06, 2008 at 03:37:48PM +0100, Stephane Bourgeois wrote: Hi, I do not get how par works, help please. Let's say I have a simple plot: plot(1:10) I want to change the font size for the x axis... how do I do that? OK, so firstly go to the help page for par by

[R] Warning when using survey:::svyglm

2008-08-06 Thread Ben Domingue
Howdy, Referencing the below exchange: https://stat.ethz.ch/pipermail/r-help/2006-April/103862.html I am still getting the same warning (non-integer #successes in a binomial glm!) when using svyglm:::survey. Using the API data: library(survey) data(api) #stratified sample

Re: [R] boxplot with average instead of median

2008-08-06 Thread HBaize
Hadley makes a good point. Boxplots should be standardized. Thre is already inconsistency in what value the wiskers represent. Violin plots with means and 95% CI are a good option if you want to show the shape of a distribution with the mean. You could add the median as well. That's what I did

Re: [R] Weibull Likelihod function.

2008-08-06 Thread Prof Brian Ripley
For a log-likelihood, just sum values of dweibull(x, log=TRUE) On Wed, 6 Aug 2008, [EMAIL PROTECTED] wrote: Is there a likelihod function for the Weibull distribution in 'R'? I found the following reference:

[R] subsetting with column name as string

2008-08-06 Thread Faheem Mitha
Hi, Consider the following x = c(1,2) y = c(3,4) d = data.frame(cbind(x,y)) d$x [1] 1 2 d$x [1] 1 2 foo = function(val) + { + return(d$val) + } bar = function() + { + return(d$x) + } foo(x) NULL bar() [1] 1 2 I'm a little surprised that R accepts both the form d$x and d$x,

[R] I need AIC and LIkelihood values from Reduced Major Axis regression for model selection

2008-08-06 Thread Christopher Bryan Cunningham
Hello, I am currently trying to run a series of models (all combinations of 4 independent factors, non-duplicate) and selecting the best one to describe my data. I was wondering if anyone knew of a way to get AIC and Likelihood values from R when using reduced major axis regression (RMA). I

Re: [R] Merging two datasets

2008-08-06 Thread rkevinburton
I looked at 'merge'. What if df1 and df2 are data.frames and I want to merge on on column and sum on another? Say df1 and df2 are data.frames with columns 'ID1', 'ID2', 'ID3', and 'Qty'. I want to 'merge' the data frames (and produce a new data.frame) if there is a matching 'ID2' in each

[R] Write greek text to Windows Unicode file

2008-08-06 Thread Weltler Rezső - Contenuto Bt.
Hi, everybody! I am an experienced senior programmer, but absolutely newbie in R, so excuse me if my question is too silly. I need for my work to evaluete some greek text statistically. The text is in a Windows Unicode file, so I read it in via

[R] price returns conversion

2008-08-06 Thread Murali Menon
folks, is there a better way to convert a daily series of price returns to a monthly one than as follows: library(xts) a - xts(rnorm(100) / 100, order.by = as.Date(1:100)) am - diff(to.monthly(cumsum(a))[, 4]) # [, 4] for Close levels the problem with this is that the entire first month of

[R] Incomplete x-axis in barplots

2008-08-06 Thread Hanna Granroth
Hi everyone, This is a graphics question, concerning presentation rather than actually producing figures. After much fiddling I've managed to create bar plots showing error bars. I've put in an x-axis, which goes along all the bars, but doesn't appear between the y-axis and the first bar. I've

[R] matching problem

2008-08-06 Thread Tom.O
I have a matching problem that I cant solve. mystring = xxx{XX}yy{YYY}zzz{Z} where x,X,y,Y,z,Z basiclly can be anything, letters, digits etc. I'm only interested in the content within each {}. I am close but not really there yet. library(gsubfn) strapply(mystring,\\{[^\\}]+,, perl=F) gives me

Re: [R] subsetting with column name as string

2008-08-06 Thread milton ruser
Try this foo1 = function(val) { return(d[val]) } foo1(x) Good luck miltinho astronauta brazil On 8/6/08, Faheem Mitha [EMAIL PROTECTED] wrote: Hi, Consider the following x = c(1,2) y = c(3,4) d = data.frame(cbind(x,y)) d$x [1] 1 2 d$x [1] 1 2 foo = function(val)

Re: [R] matching problem

2008-08-06 Thread Henrique Dallazuanna
One option is: strapply(mystring, \\{[^\\}]+ , function(x)gsub(\\{, , x), perl = F) On Wed, Aug 6, 2008 at 10:01 AM, Tom.O [EMAIL PROTECTED] wrote: I have a matching problem that I cant solve. mystring = xxx{XX}yy{YYY}zzz{Z} where x,X,y,Y,z,Z basiclly can be anything, letters, digits etc.

Re: [R] subsetting with column name as string

2008-08-06 Thread Faheem Mitha
On Wed, 6 Aug 2008, milton ruser wrote: Try this foo1 = function(val) { return(d[val]) } foo1(x) Thanks for the suggestion. I appreciate it. My original question wasn't just a pragmatic how do I do this type question. I was also wondering about the language issues involved.

Re: [R] matching problem

2008-08-06 Thread Gabor Grothendieck
On Wed, Aug 6, 2008 at 9:01 AM, Tom.O [EMAIL PROTECTED] wrote: I have a matching problem that I cant solve. mystring = xxx{XX}yy{YYY}zzz{Z} where x,X,y,Y,z,Z basiclly can be anything, letters, digits etc. I'm only interested in the content within each {}. I am close but not really there

Re: [R] Write greek text to Windows Unicode file

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Weltler Rezső - Contenuto Bt. wrote: Hi, everybody! I am an experienced senior programmer, but absolutely newbie in R, so excuse me if my question is too silly. I need for my work to evaluete some greek text statistically. The text is in a Windows Unicode file, so I

Re: [R] subsetting with column name as string

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Faheem Mitha wrote: Hi, Consider the following x = c(1,2) y = c(3,4) d = data.frame(cbind(x,y)) d$x [1] 1 2 d$x [1] 1 2 foo = function(val) + { + return(d$val) + } bar = function() + { + return(d$x) + } foo(x) NULL bar() [1] 1 2 I'm a little surprised

Re: [R] Incomplete x-axis in barplots

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Hanna Granroth wrote: Hi everyone, This is a graphics question, concerning presentation rather than actually producing figures. After much fiddling I've managed to create bar plots showing error bars. I've put in an x-axis, which goes along all the bars, but doesn't appear

Re: [R] Merging two datasets

2008-08-06 Thread John Kane
You need to do the merge and then sum in a separate operation I think you may have to rename the columns. See ?names --- On Wed, 8/6/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: Re: [R] Merging two datasets To: Henrique Dallazuanna [EMAIL

[R] Index alternative to nasty FOR loop?

2008-08-06 Thread zack holden
Dear R wizards, I have a folder containing 1000 files. For each file, I need to extract the first row of each file, paste it to a new file, then write out that file. Then I need to repeat this operation for each additional row (row 2, then row 3, etc) for 23 rows in each file. I can do

[R] a little help for compiling R!

2008-08-06 Thread jgarcia
Hi; I'm trying to install R in a computer in which I have only non-root access, and I've got readline in a local own directory. I cannot find my way to compile with readline. I've tried: [sun2]/global/jgarcia/SRC/R/R-2.7.1: ./configure --prefix=/global/jgarcia/BIN/R

[R] Diagnosing Documentation Issues

2008-08-06 Thread stephen sefick
Mac OS X 10.5.4 intel processor R 2.7.1 MacTex - latest version (yesterday and checked for updates) I am trying to diagnose a documentation issue. I don't know TeX at all- I may have a friend who does I will find out tonight, but this is more of a procedural question. I have Read the FAQ, R

[R] bug submitting bug? [Fwd: Undelivered Mail Returned to Sender]

2008-08-06 Thread Chris Andrews
(A) I received the following bounced message when I tried to submit a bug from http://bugs.r-project.org/cgi-bin/R (B) The bug report itself is at the bottom. Thanks, Chris (A) Original Message Subject:Undelivered Mail Returned to Sender Date: Wed, 6 Aug 2008

Re: [R] Index alternative to nasty FOR loop?

2008-08-06 Thread Charles C. Berry
On Wed, 6 Aug 2008, zack holden wrote: Dear R wizards, I have a folder containing 1000 files. For each file, I need to extract the first row of each file, paste it to a new file, then write out that file. Then I need to repeat this operation for each additional row (row 2, then row 3, etc)

[R] normal score fuction

2008-08-06 Thread Alessandro
Hi all, is there a Normal score(nscore) function to download? Because when I try: rsam.sc - nscore(rsam) Error: don't find nscorefunction Thanks Ale [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] a little help for compiling R! - DISREGARD!

2008-08-06 Thread jgarcia
Hi, I'm sorry for the quick question, I've have just found the correct syntax (in an old message of Prof.Ripley to the list), compiled correclty the code, and checked everything goes fine. Best wishes, Javier --- Hi; I'm trying to install R in a computer in which I have only

Re: [R] normal score fuction

2008-08-06 Thread Marc Schwartz
on 08/06/2008 01:36 PM Alessandro wrote: Hi all, is there a Normal score(nscore) function to download? Because when I try: rsam.sc - nscore(rsam) Error: don't find nscorefunction Thanks Ale It would be helpful to know where you heard about the function. The only reference that I can

Re: [R] a little help for compiling R!

2008-08-06 Thread Prof Brian Ripley
Look at config.log for why it fails to find readline. We can't help you without it. On Wed, 6 Aug 2008, [EMAIL PROTECTED] wrote: Hi; I'm trying to install R in a computer in which I have only non-root access, and I've got readline in a local own directory. I cannot find my way to compile

[R] random forest: data splitting and covariates

2008-08-06 Thread Dirk Nemitz
Hello, I am currently evaluating different ways to analyse a specific multiple species monitoring system. One idea is to identify the important covariates with random forest. However, there are some points I have problems to get my head around. 1. I have observations from a GRID with 25

Re: [R] Opening R from Tinn without setting directory each time

2008-08-06 Thread John C Frain
I find that some packages, that I need, do not always work with the latest version of R. For that reason I always keep earlier versions of R and the relevant old packages and run it in parallel with the latest version. I use Tinn-R and use the RSetReg.exe from the relevant bin directory to

[R] defining the distance between axis label and axis

2008-08-06 Thread Jörg Groß
Hi, How can I make the distance between an axis-label and the axis bigger? I haven't found anything in par()... __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] defining the distance between axis label and axis

2008-08-06 Thread Mark Difford
Hi Jörg, I haven't found anything in par()... No? Well don't bet your bottom $ on it (almost never in R). ?par (sub mgp). Mark. Jörg Groß wrote: Hi, How can I make the distance between an axis-label and the axis bigger? I haven't found anything in par()...

Re: [R] defining the distance between axis label and axis

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Jörg Groß wrote: How can I make the distance between an axis-label and the axis bigger? I haven't found anything in par()... Look at mgp. Depending what you mean by 'axis-label' one of its three values is relevant. -- Brian D. Ripley, [EMAIL PROTECTED]

Re: [R] defining the distance between axis label and axis

2008-08-06 Thread Marc Schwartz
on 08/06/2008 03:21 PM Jörg Groß wrote: Hi, How can I make the distance between an axis-label and the axis bigger? I haven't found anything in par()... Depends upon what you mean by the axis labels... If by axis labels, you are referring to the text annotation typically centered on the

Re: [R] grid layout scaling viewport width based solely on height

2008-08-06 Thread Paul Murrell
Hi Peter Cowan wrote: Hello all, I'm trying to write a function that produces a main plotting region with several square plots along the right side. Ideally the size of right side plots will scale only with the height of the entire plot, yet never overlap with another secondary plot.

Re: [R] bug submitting bug? [Fwd: Undelivered Mail Returned to Sender]

2008-08-06 Thread Peter Dalgaard
Chris Andrews wrote: (A) I received the following bounced message when I tried to submit a bug from http://bugs.r-project.org/cgi-bin/R (B) The bug report itself is at the bottom. Aargh... Support staff alerted. Presumably, this happened in connection with the server move in early July.

[R] using acf() for multiple columns

2008-08-06 Thread rcoder
Hi everyone, I'm trying to use the acf() function to calculate the autocorrelation of each column in a matrix. The trouble is that I can only seem to get the function to work if I extract the data in the column into a separate matrix and then apply the acf() function to this column. I have

Re: [R] Exporting data to a text file

2008-08-06 Thread Don MacQueen
You could try using sink() instead of write.table() to append the clustering . write.table(myclara$data,cluster.dat) sink(cluster.dat,append=TRUE) print( myclara$clustering ) sink() That will definitely append clustering to the file. -Don At 6:49 PM +0200 8/1/08, pacomet wrote: HI R users

Re: [R] using acf() for multiple columns

2008-08-06 Thread Ling, Gary (Electronic Trading)
Hi, here is one possible solution ... -gary ### example ### # create a 500x3 multi-ts A - matrix(rnorm(1500),nrow=500) # misc. graphical setting par(mfrow=c(ncol(A),1)) # then our friend -- lapply(split(...)) lapply(split(A,col(A)), acf) #Or lapply(split(A,col(A)), function(ts) acf(ts,

Re: [R] Matrix multiplication

2008-08-06 Thread Ling, Gary (Electronic Trading)
Hi, Yes. this is a way, and relatively easy ... Using Reduce. Note: in order to use Reduce, you need an update-to-date version of R. I'm using 2.6.2. First you have to have all the matrices line up with correct dimensions, i.e. [m_1 x m_2] %*% [m_2 x m_3] %*% ... %*% [m_(n-1) x m_n] (u get my

Re: [R] optimize simultaneously two binomials inequalities using nlm( ) or optim( )

2008-08-06 Thread Emir Toktar
Dear Marc, I'd been used the acceptance sampling but it is not possible to minimize given that problem. It fits very well to calculate, but it's necessary have an acceptance plan defined to assess the probabilities (p1,p2) and consumer and producer risks... Thank you for the tips. EToktar

[R] Union of columns of two matrices

2008-08-06 Thread Giuseppe Paleologo
I was posed the following problem/teaser: given two matrices, come up with an elegant (=fast short) function that returns a matrix with all and only the non-duplicated columns of both matrices; the column order does not matter. In essence, a matrix equivalent of union(x,y), where x and y are

[R] error in installing R packages

2008-08-06 Thread Eva Winter
Hello, I am trying to install R packages under linux, some of the packages can not be installed and I got the following errors, could anybody give me suggestion on where the problem is and how to fix them? Thanks -e .libPaths() [1] /usr/lib64/R/library

Re: [R] Union of columns of two matrices

2008-08-06 Thread Ling, Gary (Electronic Trading)
Here is my attempt. I'm not sure if that's the most efficient way to do it, cause I'm cheating using the nice features from R, namely duplicated(). I assume the matrices have same number of rows. ### example ### ### background setup: simulate 2 matrices with some common columns (A - cbind(1:4,

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-06 Thread Paul Murrell
Hi Arthur Roberts wrote: Hi, all, I would like to know if there is any gui interface out there (academic or commercial) that allows one to edit R-language generated graphs (e.g positioning x axis labels.) It would be nice to have something like the user interface of Igor or

[R] error in installing R packages

2008-08-06 Thread Eva Winter
Hello, I am trying to install R packages under linux, some of the packages can not be installed and I got the following error, could anybody give me suggestion on where the problem is and how to fix it? Thanks-e .libPaths() [1] /usr/lib64/R/library [2]

Re: [R] Union of columns of two matrices

2008-08-06 Thread Johnson, Eric A. (Seattle)
If a and b are your matrices of common row length, unique() can solve it: unique(cbind(a,b), MARGIN=2) Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Giuseppe Paleologo Sent: Wednesday, August 06, 2008 3:33 PM To: r-help@r-project.org Subject:

Re: [R] Warning when using survey:::svyglm

2008-08-06 Thread Thomas Lumley
It isn't (and never was) indicative of a problem. You can make the warning go away by using quasibinomial() instead of binomial(), as in the example on the help page. Incidentally, it's survey::svyglm (::, not :::) -thomas On Wed, 6 Aug 2008, Ben Domingue wrote: Howdy,

Re: [R] Diagnosing Documentation Issues

2008-08-06 Thread Rolf Turner
On 7/08/2008, at 10:58 AM, stephen sefick wrote: using R CMD Rd2dvi --pdf foo.Rd creates pdfs for everyone of the files separately. What do I do now? Back off a bit. I.e. go up two levels to the directory containing your package source. Then do R CMD Rd2dvi --pdf package name

Re: [R] About colours in violin and simple violin plots

2008-08-06 Thread Ben Bolker
Fernando Marmolejo Ramos fernando.marmolejoramos at adelaide.edu.au writes: Dear R users Let’s assume I have the following batches of data a - rnorm(20,200,100) b - rnorm(20,250,100) c - rnorm(20,300,100) # I plot them as violin plots require(vioplot) vioplot(a, b, c) # I plot

Re: [R] Greek characters in plots

2008-08-06 Thread emir.toktar
Hi, you could try to do: text(x,y, expression(paste(A) ,Delta,stbA::cat)); # uppercase 'D'elta text(x,y, expression(paste(A) ,delta,stbA::cat)); #lowercase 'd'elta or yet text(x,y, A) \\*DstbA::cat, vfont=c(serif, plain)) # here there are too many examples... demo(plotmath) 'Alpha' -

Re: [R] Merging two datasets

2008-08-06 Thread Shreyasee Pradhan
Hey Guys, Thanks for the suggestions and instant reply. merge(df1, df2, all=TRUE) worked for my datasets. And yes, I had rename the columns before doing that, as there were special characters in the variables. Thanks, Shreyasee On Wed, Aug 6, 2008 at 10:42 PM, John Kane [EMAIL PROTECTED]

Re: [R] Attempting to make a custom color spectrum to use in heatmap.2

2008-08-06 Thread Thomas Lumley
colorRampPalette() may do what you want. -thomas On Wed, 6 Aug 2008, Daniel Bernstein wrote: Hello there! I'd just like to say in advance, Thank you, for any help and/or advice. My problem is as follows: I have a dataset that is made up of percentages. I've assigned my error

Re: [R] Fix for nls bug???

2008-08-06 Thread Prof Brian Ripley
Your example works in R-patched, as a consequence of investigations of a different problem. (See the comments in the posting guide about updating your R and trying the very latest versions.) Windows binaries for R-patched are available on CRAN. On Tue, 5 Aug 2008, Keith Jewell wrote: Hi