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

Re: [R] RESHAPE cast help.

2008-08-06 Thread rkevinburton
Thank you for your help. Now let me really show my ignorance. How do I iterate through this data frame? So with your help I have a list like head(c) DayOfYear Category Quantity 1 1 (Unknown) 82 2 1 7" Plates (Dessert)4 3 1 7" Pl

Re: [R] R CMD check message that I can't figure out (.onLoad failed)

2008-08-06 Thread Uwe Ligges
stephen sefick wrote: I have been able to track and fix everything so far with R CMD check. How do I make this reproducible and I will do it. this is the message that I got: Error in fun(...) : couldn't connect to display ":0.0" Error : .onLoad failed in 'loadNamespace' for 'tcltk' The f

Re: [R] R CMD check message that I can't figure out (.onLoad failed)

2008-08-06 Thread Prof Brian Ripley
On Wed, 6 Aug 2008, Uwe Ligges wrote: stephen sefick wrote: I have been able to track and fix everything so far with R CMD check. How do I make this reproducible and I will do it. this is the message that I got: Error in fun(...) : couldn't connect to display ":0.0" Error : .onLoad failed i

Re: [R] creating overall title for plots made with par(mfrow=c(2, 2))

2008-08-06 Thread Arthur Roberts
Dear Mark, I asked a similar question, yesterday. The answer is: par(mfrow=c(1,2),oma=c(0,0,2,0)) plot(x) plot(x) title("My Title", outer=TRUE) You need to set up a margin for the title and set the title to outer. I hope this helps. Best wishes, Art On Aug 5, 2008, at 4:05 PM, Mark Kimpe

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

2008-08-06 Thread Paul Chatfield
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 installation (cd C:/Program Fil

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

2008-08-06 Thread Peter Cowan
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. The following two snippets get cl

[R] [R-pkgs] major release ff 2.0 (large atomic objects)

2008-08-06 Thread Jens Oehlschlägel
Dear R community, ff Version 2.0 is available on CRAN. Based on paging concepts from version 1.0, 2.0 is a major redesign of this package for handling large datasets. We have implemented numerous enhancements and performance improvements to make this package suitable as a 'base' package for lar

[R] Help in running Stata dataset in R

2008-08-06 Thread Lazarus Mramba
Dear All, I installed R 2.7.0 and tried to call a dataset i had ealier own called on R2.6.2 but i keep on getting an error: use("maltreat.dta") Error in fromchar(x) : character string is not in a standard unambiguous format Tried doing the same with R2.7.1 but i get the same error. However i

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

2008-08-06 Thread Tomas Lanczos
Hello, I need to do some basic statistics on raster images (tiff or png). I need only an advice where to start, which package is the most appropriate. My search attempts were without success, yet. Many thanks Tomas __ R-help@r-project.org mailing list

Re: [R] odds ratios in multiway tables (stratified)

2008-08-06 Thread Wim Bertels
On Thu, 2008-07-31 at 10:31 -0500, Marc Schwartz wrote: > on 07/31/2008 07:40 AM Wim Bertels wrote: > > On Wed, 2008-07-30 at 12:13 -0500, Marc Schwartz wrote: > >> on 07/30/2008 08:48 AM Wim Bertels wrote: > >>> Hi, > >>> > >>> does anyone know of a function to calculate odds ratios in multiway >

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() complainin

[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 o

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: > He

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 install

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 applicati

Re: [R] Iterating Named List

2008-08-06 Thread Kenn Konstabel
There is one useful trick with `backticks` you probably didn't try yet: ?`$` And right after that, try: ?`[[` It is important to read both of these documents :) Kenn On Tue, Aug 5, 2008 at 5:16 PM, Gundala Viswanath <[EMAIL PROTECTED]>wrote: > Hi all, > > I have the following named list:

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: socserv.mcmaster.c

[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: LC_C

[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 B1

[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 yo

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

2008-08-06 Thread Prof Brian Ripley
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 as.Date("1960-1-1"): you might want to try that to see if it malf

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 ma

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 Wind

[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 va

[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 times-to-f

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 > Receiv

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 an

[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 t

[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 correlat

[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 proble

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 ve

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

[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 regist

[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 thi

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

2008-08-06 Thread Leandro Marino
> par(ps=15) > plot(1:10) -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de Stephane Bourgeois Enviada em: quarta-feira, 6 de agosto de 2008 11:38 Para: r-help@r-project.org Assunto: [R] Font size in plots (I do NOT understand par help) Hi, I do not get how p

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=1741502&forum_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

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, xaxt="

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 as.Date("1960-1-1"

[R] Package for TURF analysis

2008-08-06 Thread Data Analytics Corp.
Hi, Does anyone know of an R package or set of functions for doing Total Unduplicated Reach and Frequency (TURF) analysis? This is somewhat popular in the advertising area. Thanks, Walt -- Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsbor

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 f

[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 dstrat<-svydesign(id=~

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: http://www.weibull.com/LifeDataWeb/weibull_log_likelihood_functions_and_their_partia

[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

[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 ca

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 data.fr

[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 readLines(...,encodin

[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 sea

[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,"\\{[^\\}]+",, p

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

Re: [R] Incomplete x-axis in barplots

2008-08-06 Thread Marc Schwartz
on 08/06/2008 10:42 AM 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] 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

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

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 rea

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 surpr

Re: [R] subsetting with column name as string

2008-08-06 Thread Dan Davison
On Wed, Aug 06, 2008 at 11:53:25AM -0400, 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")

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

2008-08-06 Thread Emir Toktar
Thanks Mr. Graves for your support. > I saw your post on 7/29, and I have not seen a reply, > so I will attempt a response to the question at the start of > your email: > > obtain the smallest value of 'n' (sample size) satisfying > both inequalities: > > (1-alpha)

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 b

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

[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 this

[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 --with-readline-includes=/glob

[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 packa

[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 17:08:

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 "nscore"function 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 "nscore"function 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 wit

[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 systemati

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 change

[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 http://www.R-project.org

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 axis

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. Mail

[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 somet

[R] Matrix multiplication

2008-08-06 Thread Zhang Yanwei - Princeton-MRAm
Hi all, Is there an easy way to do cumulative matrix multipliation in R? What's the syntex? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: [EMAIL PROTECTED] [[alternative HTML version

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, lag.max

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 v

[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] Diagnosing Documentation Issues

2008-08-06 Thread stephen sefick
using R CMD Rd2dvi --pdf foo.Rd creates pdfs for everyone of the files separately. What do I do now? On Wed, Aug 6, 2008 at 1:49 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > Mac OS X 10.5.4 > intel processor > R 2.7.1 > MacTex - latest version (yesterday and checked for updates) > I am tryin

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:

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

[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: [R

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, Referencing

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

2008-08-06 Thread Daniel Bernstein
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" percentages a value of '-100', my "non-existent" percentages a value of '0', and all my other percentages

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 This will cre

  1   2   >