[R] Adding columns to a grouped data frame

2008-04-10 Thread filip rendel
Hello! I'm working with a big data set of patients. The data consists of different variables sorted rowwise for each patient. Now I want to add a new variable for each patient by adding two different variables of the data frame. [[alternative HTML version deleted]] ___

[R] Stderr

2008-04-10 Thread Patricia García
Hi everyone, I need to get an error message as an object in the std output console. I can get it as a file with the following instructions: # Save error mesage: error1 <- file("error1.txt", open="wt") sink(error1, type="message") experiment <- function(data) With this, the error m

Re: [R] How to create a legend without plot, and to use scientific notation for axes label ?

2008-04-10 Thread Uwe Ligges
Ng Stanley wrote: > Hi, > > I have a 3 by 2 plots per page, and would like to place a legend on the last > region. How to do that ? Create an empty plot, e.g.: plot(1, type="n", axes=FALSE, xlab="", ylab="") legend(1, 1, legend = c("Hello", "World"), col=1:2, lwd=2, cex=3, xjust=0.5,

Re: [R] How to create a legend without plot, and to use scientific notation for axes label ?

2008-04-10 Thread Uwe Ligges
Uwe Ligges wrote: > > > Ng Stanley wrote: >> Hi, >> >> I have a 3 by 2 plots per page, and would like to place a legend on >> the last >> region. How to do that ? > > > Create an empty plot, e.g.: > > plot(1, type="n", axes=FALSE, xlab="", ylab="") > legend(1, 1, legend = c("Hello", "World"

Re: [R] how to read data from table based a condition

2008-04-10 Thread Uwe Ligges
Xin wrote: > Dear All: > > I imported a table into R. But I want to read a variable (y) from this > table conditional on another variable (x=1) in the table. > > y<-data[,7] > x<-data[,3] > > I want to know the mean of y if corresponding x=1. > > I tried > > if (x==1) y3<-y > > It do

[R] Beautifying axis tick labels

2008-04-10 Thread Ng Stanley
Hi, For example, the y axis shows "0 50 150". Is there any way to beautify the tick labels to get 0 5 10 15, and at the top of y-axis "x10^5" (superscript 5) ? My plots all have different ylim, how to perform the beautification automatically ? Thanks Stanley [[alternative HTML ve

Re: [R] Beautifying axis tick labels

2008-04-10 Thread Richard . Cotton
> For example, the y axis shows "0 50 150". Is there any way to > beautify the tick labels to get 0 5 10 15, and at the top of y-axis "x10^5" > (superscript 5) ? My plots all have different ylim, how to perform the > beautification automatically ? plot((0:15)*1e5, yaxt="n", ylab="") axis(

Re: [R] how to read data from table based a condition

2008-04-10 Thread Marc Moragues
Xin hotmail.com> writes: > > y<-data[,7] > x<-data[,3] > > I want to know the mean of y if corresponding x=1. > Try this: mean(data[data[,3]==1,data[,7]) You can also look at ?subset. __ R-help@r-project.org mailing list https://stat.ethz.ch/m

Re: [R] how to read data from table based a condition

2008-04-10 Thread Uwe Ligges
Marc Moragues wrote: > > Xin hotmail.com> writes: > > >> y<-data[,7] >> x<-data[,3] >> >> I want to know the mean of y if corresponding x=1. >> > > Try this: > > mean(data[data[,3]==1,data[,7]) Folks, please! 1. If you answer, please write at least syntactically valid code (look at your

Re: [R] Stderr

2008-04-10 Thread Patricia García
Hi, sorry for the last sentence, i was trying to make a generic statement by writing "function" So the code has to be: # Save error mesage: error1 <- file("error1.txt", open="wt") sink(error1, type="message") experiment <- somefunction(data) (I mean no matter what function is...) er

Re: [R] Error: expected the collection operator c error pos 98 (error on line 1)

2008-04-10 Thread Uwe Ligges
Quick inspection shows that we cannot do anything. In BUGS, Y indicates a scalar and Y[] indicates a vector. For scalar Y, you need Y=0.0E+00 in your data file, but for vector Y[], you need Y=c(0.0E+00) in your data file. This means you need to know what Y is in the model and I do not s

Re: [R] bucketing in histograms

2008-04-10 Thread Uwe Ligges
Mark Farnell wrote: > Hi > > I wish to draw a histogram for a numeric array and specify a bucket > size (say 5 units per bar and the height of that bar equals to the > average of that 5 units) > > how can I do that? Sometimes I wonder what is going on here. Folks, please read the posting guid

Re: [R] Error: expected the collection operator c error pos 98 (error on line 1)

2008-04-10 Thread Uwe Ligges
Blanchard, Suzette wrote: > Greetings, > > > > I implemented BRugs to run the EWOC model with a cohort size N=1. I > output the simulation data using bugsdata(data), where data is the following > list. > > > >> data > > $Dose > > [1] 140 > > > > $Y > > [1] 0 > > > >

Re: [R] Stderr

2008-04-10 Thread Uwe Ligges
Patricia García wrote: > Hi, > > sorry for the last sentence, i was trying to make a generic statement by > writing "function" > So the code has to be: > > # Save error mesage: >error1 <- file("error1.txt", open="wt") >sink(error1, type="message") >experiment <- somefunction(data)

Re: [R] How to create a legend without plot, and to use scientific notation for axes label ?

2008-04-10 Thread Stanley Ng
Hi, How can I use formatC to convert 600 to 6e5 and not 6e+05 ? > formatC(60) [1] "6e+05" > formatC(60, format="e", digit=0) [1] "6e+05" -Original Message- From: Uwe Ligges [mailto:[EMAIL PROTECTED] Sent: Thursday, April 10, 2008 17:11 To: Ng Stanley Cc: r-help Subject: Re:

[R] How to estimate a hazard ratio using an external hazard function

2008-04-10 Thread Montserrat Rue
Hi, I would like to compare the hazard functions of two samples using the Cox proportional hazards model. For sample 1 I have individual time-to-event data. For sample 2 I don't have individual data, but grouped data that allows to obtain a hazard function. I am wondering if there is an R functio

Re: [R] Skipping specified rows in scan or read.table

2008-04-10 Thread Abhijit Dasgupta
Hi Ravi, One thing I tend to do is, when using read.table, specify the option 'colClasses='character''. This forces everything to be read as a character. From there, as.numeric works fine, and you don't have to deal with factors and reconverting them. Hope this helps Abhijit Ravi Varadhan wro

Re: [R] New user, requesting help with MAC installation of R

2008-04-10 Thread Ingmar Visser
I guess that the default is to plot to a ps file rather than to a graphics window when using R from the terminal. hth, Ingmar On 10 Apr 2008, at 12:02, Sophia Yancopoulos wrote: > Hi: > > Yesterday I downloaded R and got it up and running on my PC without a > hitch, not so when I tried to do th

Re: [R] Stderr

2008-04-10 Thread Uwe Ligges
Patricia García wrote: > Hi everyone, > > I need to get an error message as an object in the std output console. I can > get it as a file with the following instructions: > > # Save error mesage: > error1 <- file("error1.txt", open="wt") > sink(error1, type="message") > experiment

[R] New user, requesting help with MAC installation of R

2008-04-10 Thread Sophia Yancopoulos
Hi: Yesterday I downloaded R and got it up and running on my PC without a hitch, not so when I tried to do the same on my Mac powerbook, using Mac OSX: version 10.4.11.. I have virtually no experience, so I can't tell what exactly went wrong. At first it appeared that the software loaded c

[R] bucketing in histograms

2008-04-10 Thread Mark Farnell
Hi I wish to draw a histogram for a numeric array and specify a bucket size (say 5 units per bar and the height of that bar equals to the average of that 5 units) how can I do that? Thanks! Mark __ R-help@r-project.org mailing list https://stat.ethz

[R] how to read data from table based a condition

2008-04-10 Thread Xin
Dear All: I imported a table into R. But I want to read a variable (y) from this table conditional on another variable (x=1) in the table. y<-data[,7] x<-data[,3] I want to know the mean of y if corresponding x=1. I tried if (x==1) y3<-y It does not work. Anyone can give a help? Than

Re: [R] How to create a legend without plot, and to use scientific notation for axes label ?

2008-04-10 Thread Hans-Joerg Bibiko
On 10 Apr 2008, at 12:33, Stanley Ng wrote: > How can I use formatC to convert 600 to 6e5 and not 6e+05 ? > >> formatC(60) > [1] "6e+05" >> formatC(60, format="e", digit=0) > [1] "6e+05" Try this: gsub("([eE])(\\+?)(\\-?)0+", "\\1\\3", formatC(60, format="e", digit=0)) --Hans

Re: [R] How to create a legend without plot, and to use scientific notation for axes label ?

2008-04-10 Thread Hans-Joerg Bibiko
On 10 Apr 2008, at 12:57, Hans-Joerg Bibiko wrote: > > On 10 Apr 2008, at 12:33, Stanley Ng wrote: >> How can I use formatC to convert 600 to 6e5 and not 6e+05 ? >> >>> formatC(60) >> [1] "6e+05" >>> formatC(60, format="e", digit=0) >> [1] "6e+05" > > > Try this: > > gsub("([eE])(\\+?)

Re: [R] legend placement

2008-04-10 Thread Duncan Murdoch
Ng Stanley wrote: > Hi, > > I am plotting 5 charts using p <- par(mfrow = c(3, 2), how can I place my > legend in the last region ? I don't wan to put it into the margin. You should be able to do a blank plot, then plot the legend. For example, > par(mfrow=c(3,2)) > for (i in 1:5) plot(1) > p

[R] Orthogonal polynomial contrasts

2008-04-10 Thread Chris Bennett
How do you remove one of the terms from an ordered polynomial contrast in your linear model. For example, I have significant terms for linear and cubic but not quadratic, how would i remove the quadratic term from lm(response~treatment) Cheers, Chris -- View this message in context: http://ww

[R] [R-pkgs] RcmdrPlugin.Export_0.2-0 released

2008-04-10 Thread Liviu Andronic
Dear R users, I am pleased to announce the release of the Export plug-in for Rcmdr. At the moment, it is simply a graphical user interface to xtable(). Several developments are, however, planned. It is worth to note that the Manual offers several pointers on using Sweave together with LyX, and fro

Re: [R] Orthogonal polynomial contrasts

2008-04-10 Thread Peter Dalgaard
Chris Bennett wrote: > How do you remove one of the terms from an ordered polynomial contrast in > your linear model. For example, I have significant terms for linear and > cubic but not quadratic, how would i remove the quadratic term from > lm(response~treatment) > > Cheers, > Chris > Are you

Re: [R] Beautifying axis tick labels

2008-04-10 Thread Jim Lemon
Ng Stanley wrote: > Hi, > > For example, the y axis shows "0 50 150". Is there any way to > beautify the tick labels to get 0 5 10 15, and at the top of y-axis "x10^5" > (superscript 5) ? My plots all have different ylim, how to perform the > beautification automatically ? Hi Stanley, You

Re: [R] How to estimate a hazard ratio using an external hazard function

2008-04-10 Thread Terry Therneau
included message Hi, I would like to compare the hazard functions of two samples using the Cox proportional hazards model. For sample 1 I have individual time-to- event data. For sample 2 I don't have individual data, but grouped data that allows to obtain a hazard function. I am wo

[R] two graphs in one figure?

2008-04-10 Thread Anne-Katrin Link
Dear all, how can I plot a line graph and a bar graph in one single figure? I tried to combine "barplot" and "plot". Even though they both have the same x-values (1 to 55),  it just doesnt look as if they match in their scale (the barplot is much wider than the "plot"even though I tried to

Re: [R] Orthogonal polynomial contrasts

2008-04-10 Thread Frank E Harrell Jr
Peter Dalgaard wrote: > Chris Bennett wrote: >> How do you remove one of the terms from an ordered polynomial contrast in >> your linear model. For example, I have significant terms for linear and >> cubic but not quadratic, how would i remove the quadratic term from >> lm(response~treatment) >> >

[R] New Special Interest Groups?

2008-04-10 Thread Hollister . Jeff
Dear list, After some extensive searching, I have drawn a blank on this. So ... Who is the best contact for questions about starting a new special interest group mailing list? Cheers, Jeff *** Dr. Jeffrey W. Hollister US EPA Atlantic Ecology D

Re: [R] two graphs in one figure?

2008-04-10 Thread ONKELINX, Thierry
Dear Anne-Katrin, You could use ggplot to do this. The example below works, although it generates some warnings. library(ggplot2) dataset <- data.frame(x = 0:55, y = rnorm(56, 10), z = runif(56, 9, 11)) ggplot(data = dataset) + geom_bar(aes(x = factor(x), y = y), position = "dodge") + geom_line

[R] quantitative real time PCR

2008-04-10 Thread Marcelo
Hi, Please, I am looking for a way to analyze my qRT-PCR in my debian gnu linux and I found a package named qpcR on cran. Do you known another one that do this analysis (preferable a R addon)? If you already had do this one in a linux box, could you point me out how you did? Thank you very much

[R] Structural Modelling in R-project

2008-04-10 Thread Ivaha C (AT)
Hi all I was wondering if I could ask for some assistance on two little enquiries that I have got. In the R-project, when using the StructTS function on a times series Zt, the programs return this: Call: StructTS(x = Zt) Variances: level slope seasepsilon 0.168461 0.000

[R] Recovering SPlus GraphSheets

2008-04-10 Thread Thompson, David (MNR)
Hello, Is it possible with R to recover the contents of SPlus GraphSheets (*.sgr) without access to SPlus? Also, some of the .sgr files may have multiple pages. Thanx, DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natu

[R] (no subject)

2008-04-10 Thread Lindsay Banin
Subject: nls, step factor 0.000488281 reduced below 'minFactor' of 0.000976563 Hi there, I'm trying to conduct nls regression using roughly the below code: nls1 <- nls(y ~ a*(1-exp(-b*x^c)), start=list(a=a1,b=b1,c=c1)) I checked my start values by plotting the relationship etc. but I kept getting

Re: [R] lme and confidence intervals

2008-04-10 Thread Gregory Warnes
FWIW, the ci() function in the gmodels package supports generating confidence intervals for the fixed effects of lme objects. -G On Apr 8, 2008, at 1:34PM , Dieter Menne wrote: > Cristian Carranza hotmail.com> writes: >> After fitting a mixed effects model to repeated measurements data >> s

Re: [R] LSODA not accurate when RK4 is; what's going on?

2008-04-10 Thread Ravi Varadhan
John, You should decrease atol and/or rtol to get accurate integration of your function. Try this: fn <- function(t,y,parms=0){return(list(t*y-1))} t4 <- seq(0, 5, by=.0001) s4 <- lsoda(y=sqrt(pi/2), times=t4, func=fn, parms=0, atol=1.e-10, rtol=1.e-10) plot(s4, type="l") Hope this is helpfu

Re: [R] Recovering SPlus GraphSheets

2008-04-10 Thread Duncan Murdoch
On 4/10/2008 9:56 AM, Thompson, David (MNR) wrote: > Hello, > > Is it possible with R to recover the contents of SPlus GraphSheets > (*.sgr) without access to SPlus? > Also, some of the .sgr files may have multiple pages. "Possible" is probably not the right word here: I'm sure the answer to yo

[R] adonis (vegan package) and subsetted factors

2008-04-10 Thread tyler
Hi, I'm trying to use adonis on a subset of data from a dataframe. The actual data is in columns 5:118, and the first four columns are various factors. There are 3 levels of the factor Habitat, and I want to examine differences among only two of them. So I started with: > CoastNear = subset(gel_d

Re: [R] LSODA not accurate when RK4 is; what's going on?

2008-04-10 Thread Ravi Varadhan
John, I should also mention that by looking at the R source for lsoda() you can see that the default values for "atol" and "rtol" are 1.e-06. This should have been mentioned in the help file, but is not. Another approach to solving your problem is to restrict "hmax", the maximum steplength. s4

[R] ggplot - plot with only legend?

2008-04-10 Thread Pedro de Barros
Dear R'ers, I am trying to build a composite plot (with several plots in one figure). I have tried, but I cannot use facetting, as I need to customize each plot using grid. Since all the plots are the same (with different data, but same layout and categories), I would like to have only one lege

Re: [R] LSODA not accurate when RK4 is; what's going on?

2008-04-10 Thread Ravi Varadhan
John, In "lsoda" the increment for "time-marching" is adaptively chosen, controlled by "atol" and "rtol". The increment is restricted to lie in (hmin, hmax). So you can ensure accuracy, perhaps, at the cost of efficiency by specifying smaller than default values for atol, rtol, and hmax, which a

Re: [R] Fit a nonlinear regression model with power exponentially distributed errors

2008-04-10 Thread Spencer Graves
You are making progress. Could you please provide a self-contained example of an attempt by you to make it work, as requested in the posting guide http://www.R-project.org/posting-guide.html? That should make it easier for someone else to provide an answer that will actually be us

Re: [R] Structural Modelling in R-project

2008-04-10 Thread markleeds
>From: "Ivaha C (AT)" <[EMAIL PROTECTED]> >Date: 2008/04/10 Thu AM 08:51:14 CDT >To: R Help >Subject: [R] Structural Modelling in R-project if you have a univariate time series and you want to break it into its various components, then you get the scalars based on a decomposition. if you have

Re: [R] Structural Modelling in R-project

2008-04-10 Thread Ivaha C (AT)
Thanks for this, it's a good start. I am using a univariate series indeed. Do you know where I could find the codes for StructTS please? I can't seem to find it. Thanks again Christian Ivaha PhD Student University of Glamorgan Faculty of Advanced Technology Treforest CF37 1DL -Original Mess

Re: [R] (no subject)

2008-04-10 Thread Katharine Mullen
I would suggest making your exact data and calls available. You can get the estimated parameters from nls even in the case that the convergence criterium is not met by saying warnOnly=TRUE in the control list. depending on why you are not getting convergence, you may want to try a different algor

Re: [R] Arbitrary Precision Numbers

2008-04-10 Thread Earl F. Glynn
"Rory Winston" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > (If you're wondering, this is a Project Euler question :)) > > If I wanted to calculate the sum of the digits in the decimal > representation > of 2^1000, what would be a good way to go about that? Try this: > library(

[R] Adding average into a matplot?

2008-04-10 Thread -Halcyon-
Hi all, I have a matrix which is filled with simulation results for several years. Example of an output (7 years, 4 simulations): [,1] [,2] [,3] [,4] [1,] 500 500 500 500 [2,] 516 519 509 508 [3,] 559 573 556 566 [4,] 613 650 611 633 [5,] 676 714 667 716 [6,]

Re: [R] two graphs in one figure?

2008-04-10 Thread hadley wickham
On Thu, Apr 10, 2008 at 8:36 AM, ONKELINX, Thierry <[EMAIL PROTECTED]> wrote: > Dear Anne-Katrin, > > You could use ggplot to do this. The example below works, although it > generates some warnings. > > library(ggplot2) > dataset <- data.frame(x = 0:55, y = rnorm(56, 10), z = runif(56, 9, 11))

Re: [R] adonis (vegan package) and subsetted factors

2008-04-10 Thread Gavin Simpson
On Thu, 2008-04-10 at 11:18 -0300, tyler wrote: > Hi, > > I'm trying to use adonis on a subset of data from a dataframe. The > actual data is in columns 5:118, and the first four columns are various > factors. There are 3 levels of the factor Habitat, and I want to examine > differences among only

[R] Tukey in R, extracting values

2008-04-10 Thread mad_bassie
hey, how can i extract the values from the CI's when i use following code for a tukey test? the output shows three CI's and i know it should work with 'names but i don't really know how... thanks library(multcomp) data1$soort<-as.factor(data1$soort) amod<-aov(waarde~soort,data=data1) g<-glht(amod

Re: [R] adonis (vegan package) and subsetted factors

2008-04-10 Thread tyler
On Thu, Apr 10, 2008 at 04:47:44PM +0100, Gavin Simpson wrote: > > This behaviour arises from the following, using the in-built dune data: > > > newdune.env <- subset(dune.env, Management != "NM") > > newdune.env$Management > [1] BF SF SF SF HF SF HF HF BF BF HF SF SF HF > Levels: BF HF NM SF >

[R] 64-bit/32-bit

2008-04-10 Thread Sancar Adali
Our research group is thinking of buying a 64-bit windows workstation with an intel core2 duo processor, and I am going to use R on it. I have a couple of questions. Is it possible to run 32-bit build of R on a 64-bit computer without problems?(For windows) Would there be problems with contrib pac

Re: [R] New user, requesting help with MAC installation of R

2008-04-10 Thread Armin Goralczyk
Hi The graphics commands should work without problem. On Mac the default graphics window is a quarz device. Did you get the 'official' mac binary from CRAN with GUI? If the problem persits you can ask in the mailing list R-SIG-Mac (see instructions for posting: http://www.r-project.org/mail.html) -

[R] How to replace German umlauts in strings?

2008-04-10 Thread Hofert Marius
Dear R-users, I have a file containing names of German students. These names contain the characters "ä", "ö" or "ü" (German umlauts). I use read.table() to read the file and let's assume the table is then stored in a variable called "data". The names are then contained in the first column,

[R] Problem installing and using package "tseries"

2008-04-10 Thread Robert A. LaBudde
I have R 2.6.2, and have tried downloading and installing the package "tseries". I get the same error when I use two different mirror sites: > utils:::menuInstallPkgs() trying URL 'http://cran.mirrors.hoobly.com/bin/windows/contrib/2.6/tseries_0.10-14.zip' Content type 'application/zip' length

[R] QP.solve, QPmat, constraint matrix, and positive definite

2008-04-10 Thread jpolo
hello all, i'm trying to use QPmat, from the popbio package. it appears to be based on solve.QP and is intended for making a population projection matrix. QPmat asks for: nout, A time series of population vectors and C, C constraint matrix, (with two more vectors, b and nonzero). i believe the rel

Re: [R] New Special Interest Groups?

2008-04-10 Thread Douglas Bates
Martin Maechler <[EMAIL PROTECTED]>, who oversees the mailing lists, would be the best person to start with. On 4/10/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >Dear list, >After some extensive searching, I have drawn a blank on this. So ... >Who is the best contact for questi

Re: [R] How to replace German umlauts in strings?

2008-04-10 Thread Hans-Jörg Bibiko
On 10.04.2008, at 18:03, Hofert Marius wrote: > I have a file containing names of German students. These names > contain the characters "ä", "ö" or "ü" (German umlauts). I use > read.table() to read the file and let's assume the table is then > stored in a variable called "data". The names are then

[R] QP.solve, QPmat, constraint matrix, and positive definite

2008-04-10 Thread jpolo
hello all, i'm trying to use QPmat, from the popbio package. it appears to be based on solve.QP and is intended for making a population projection matrix. QPmat asks for: nout, A time series of population vectors and C, C constraint matrix, (with two more vectors, b and nonzero). i believe the rel

Re: [R] permutation test assumption?

2008-04-10 Thread Ramon Diaz-Uriarte
Just an additional note: what I find interesting (that is an euphemism) is that a paper such as that got published on 2006 when a whole bunch of detailed papers on the same topic had been published in the past. For instance, the first I pick from the pile is by J. Romano, "On the behavior of random

[R] Problem with loading package Matrix

2008-04-10 Thread Peter H Singleton
Hello, I recently upgraded from R 2.6.1 to 2.6.2. I uninstalled 2.6.1, installed 2.6.2, and installed the packages I regularly use. Everyting seems to be running properly, including most of the packages, but when I try to call the Matrix package, I get the following error: > require(Matrix) Load

[R] subtract the mean from each column

2008-04-10 Thread kayj
Hi, I am new to R an dI need some help I have a matrix of real values 100*300 and I would like to calculate the mean for each column , then for each entry in a column i need to subtract the mean so I will have a matrix where the columns have zero mean. any one know how to do that . Thanks -- V

Re: [R] subtract the mean from each column

2008-04-10 Thread Chuck Cleland
On 4/10/2008 1:03 PM, kayj wrote: > Hi, > > I am new to R an dI need some help > I have a matrix of real values 100*300 and I would like to calculate the > mean for each column , then for each entry in a column i need to subtract > the mean so I will have a matrix where the columns have zero mean.

Re: [R] Adding average into a matplot?

2008-04-10 Thread Mike Prager
-Halcyon- <[EMAIL PROTECTED]> wrote: > I have a matrix which is filled with simulation results for several years. > Example of an output (7 years, 4 simulations): > [...] > My matplot gives me 4 lines, but I would like to add a line with the > averages of each year for all simulations. Can an

Re: [R] subtract the mean from each column

2008-04-10 Thread Henrique Dallazuanna
Or just: scale(mymat, scale = FALSE) On Thu, Apr 10, 2008 at 2:03 PM, kayj <[EMAIL PROTECTED]> wrote: > > Hi, > > I am new to R an dI need some help > I have a matrix of real values 100*300 and I would like to calculate the > mean for each column , then for each entry in a column i need to subtr

Re: [R] How to replace German umlauts in strings?

2008-04-10 Thread Dieter Menne
Hans-Jörg Bibiko eva.mpg.de> writes: > > On 10.04.2008, at 18:03, Hofert Marius wrote: > > I have a file containing names of German students. These names > > contain the characters "ä", "ö" or "ü" (German umlauts). I use > > read.table() to read the file and let's assume the table is then > > st

Re: [R] Tukey in R, extracting values

2008-04-10 Thread Dieter Menne
mad_bassie hotmail.com> writes: > how can i extract the values from the CI's when i use following code for a > tukey test? > the output shows three CI's and i know it should work with 'names but i > don't really know how... You forgot to post a self-running example. Chances are always better to g

[R] polytomous or multinomial regression for matched data

2008-04-10 Thread Sara Gale
Hi, I've been trying to find a program that will run a multinomial conditional regression on k:m matched data. Does anyone know of a package in R or another package that will allow this? It's not obvious that multinom within nnet or VGAM will allow matched sets. I've used a program (mcl) in

Re: [R] How to replace German umlauts in strings?

2008-04-10 Thread Peter Dalgaard
Dieter Menne wrote: > Hans-Jörg Bibiko eva.mpg.de> writes: > > >> On 10.04.2008, at 18:03, Hofert Marius wrote: >> >>> I have a file containing names of German students. These names >>> contain the characters "ä", "ö" or "ü" (German umlauts). I use >>> read.table() to read the file and let

[R] how to fit a model that is nonlinear with multiplicate errors

2008-04-10 Thread Stacey Burrows
Hi fellow R-users, I am interested in fitting the following model yi=log(a+xi*b*e), e~N(0,sigma2) and where x is a known covariate and a and b are parameters to be estimated as is sigma2. I am not sure how to fit such a model using lm or nls. Is there another function I can use to fit this?

Re: [R] Problem with loading package Matrix

2008-04-10 Thread Prof Brian Ripley
What OS is that? If it is Windows 2000, try copying Rblas.dll to Rblas in the bin folder. (We have no idea why that might be needed, but it has worked for some people -- others have no problem even with Windows 2000.) On Thu, 10 Apr 2008, Peter H Singleton wrote: > > Hello, > > I recently upgra

Re: [R] How to replace German umlauts in strings?

2008-04-10 Thread Prof Brian Ripley
Or read the file with read.table(file("umlaut.txt", encoding="MAC"), ...) On Thu, 10 Apr 2008, Peter Dalgaard wrote: Dieter Menne wrote: Hans-Jörg Bibiko eva.mpg.de> writes: On 10.04.2008, at 18:03, Hofert Marius wrote: I have a file containing names of German students. These names con

Re: [R] Arbitrary Precision Numbers

2008-04-10 Thread Rory Winston
Thanks Earl Thats exactly what I was looking for - an extension that uses libgmp and provides a bignum type that can be combined with standard operators and numeric variables. Somehow my original search on CRAN missed this one. Cheers Rory Earl F. Glynn wrote: > > "Rory Winston" <[EMAIL PROTEC

Re: [R] two graphs in one figure?

2008-04-10 Thread Greg Snow
Using par(new=TRUE) can be tricky. A better approach is to create one plot, then add the other information to it. You can add bars to an existing graph using barplot with add=TRUE, you can add lines to an existing plot using the lines function. If you give more detail of what you want (examp

[R] Types in grouped multi-panel (lattice) xyplot

2008-04-10 Thread Aaron Arvey
Apologetic prologue: I've looked through the mailing list for an answer to this (since I'm sure it's trivial) but I have not been able to find a fix. So the problem is that I want each group to have a different type of plot. "Probes" should be points and "Segments" should be lines (preferably us

[R] Row mean scores differ association

2008-04-10 Thread dt Excellent
Suppose that we have o 2-D contingency table where the row variable is nominal and the column one is ordinal. In SAS it is possible to compute the statistic named as row mean scores differ. How can we programmed it in R? (See also Aggresti (2002), Categorical Data Analysis, p. 302) With regards

[R] Relational Databases or XML?

2008-04-10 Thread Keith Alan Chamberlain
Dear R-Help, I am working on a paper in an R course for large file support in R using scan(), relational databases, and XML. I have never used SQL or heirarchical document formats such as XML (except where it occurs without user interaction), and knowledge in RDBs and XML is lacking in my progr

Re: [R] Relational Databases or XML?

2008-04-10 Thread Doran, Harold
I'm not sure it is possible to parse an XML file in R directly. Well, I guess it's *possible*, but may not be the best way to do it. ElementTree in Python is an easy-to-use parser that you might use to first parse your XML file (or others hierarchically structured data), organize it anyway you want

Re: [R] Relational Databases or XML?

2008-04-10 Thread Doran, Harold
Well, I guess it is possible with XML package on CRAN. But, it seems there is no windows binary (yet) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold > Sent: Thursday, April 10, 2008 4:29 PM > To: Keith Alan Chamberlain; r-help@r-proje

Re: [R] Types in grouped multi-panel (lattice) xyplot

2008-04-10 Thread Deepayan Sarkar
On 4/10/08, Aaron Arvey <[EMAIL PROTECTED]> wrote: > Apologetic prologue: I've looked through the mailing list for an answer to > this (since I'm sure it's trivial) but I have not been able to find a fix. > > So the problem is that I want each group to have a different type of plot. > "Probes" s

Re: [R] Types in grouped multi-panel (lattice) xyplot

2008-04-10 Thread Deepayan Sarkar
On 4/10/08, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On 4/10/08, Aaron Arvey <[EMAIL PROTECTED]> wrote: > > Apologetic prologue: I've looked through the mailing list for an answer to > > this (since I'm sure it's trivial) but I have not been able to find a fix. > > > > So the problem is t

Re: [R] Relational Databases or XML?

2008-04-10 Thread Prof Brian Ripley
On Thu, 10 Apr 2008, Doran, Harold wrote: > Well, I guess it is possible with XML package on CRAN. But, it seems > there is no windows binary (yet) There certainly is -- did you try installing it from CRAN (extras)? >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROT

Re: [R] Problem installing and using package "tseries"

2008-04-10 Thread Uwe Ligges
Can you please try to reinstall in roughly 12 hours from now from CRAN master? I have fixed the problem and recompiled tseries which will appear on CRAN master within 12 hours. Best wishes, Uwe Ligges Robert A. LaBudde wrote: > I have R 2.6.2, and have tried downloading and installing the pack

[R] function to calculate networkdays?

2008-04-10 Thread tom soyer
Hi, Does anyone know if R has a built-in function that is similar to Excel's NETWORKDAYS function? i.e., Returns the number of whole working days between two dates. Working days exclude weekends. Thanks, -- Tom [[alternative HTML version deleted]] _

[R] time series regression

2008-04-10 Thread bereket weldeslassie
Dear, I am doing a time series regression (one dependent time series variable, 7 independent time series variables and 32 annual observations). I have the problem of cointegration, autocorrelation and multicollinearity. I am considering an error correction model of the form: diff(lnY(t))=a+b1*lnY(t

Re: [R] Relational Databases or XML?

2008-04-10 Thread Gabor Grothendieck
You may wish to try out sqldf. It allows one to manipulate data frames using sql. The real work is done by sqlite and the RSQLite interface but it sets up the database for you and all the tables and then deletes them so its as easy a typing in one line of code. Check out the home page at http://s

[R] Degrees of freedom in binomial glm

2008-04-10 Thread Giovanni Petris
Hello, I am looking at the job satisfaction data below, from a problem in Agresti's book, and I am not sure where the degrees of freedom come from. The way I am fitting a binomial model, I have 168 observations, so in my understanding that should also be the number of fitted parameters in the sat

Re: [R] Relational Databases or XML?

2008-04-10 Thread Gabor Grothendieck
Its avaliable on CRAN extras: http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/ and can be downloaded even more easily through the Windows package menu in R. On Thu, Apr 10, 2008 at 4:45 PM, Doran, Harold <[EMAIL PROTECTED]> wrote: > Well, I guess it is possible with XML package on CRAN. B

Re: [R] Row mean scores differ association

2008-04-10 Thread Austin, Matt
There is a R companion to Agresti's text at the following site, I believe the answer to your question is there: http://www.stat.ufl.edu/~aa/cda/cda.html --Matt Matt Austin Biostatistics Director Amgen, Inc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Beha

[R] mixture distribution analisys

2008-04-10 Thread Antonio Olinto
Hello, I'm analyzing some fish length-frequency data to access relative age and growth information and I would like to do something different from FiSAT / ELEFAN analysis. I found a package named MIX in http://www.math.mcmaster.ca/peter/mix/mix.html but it's compiled for R 2.0.0 So I have two q

Re: [R] Types in grouped multi-panel (lattice) xyplot

2008-04-10 Thread Aaron Arvey
On Thu, 10 Apr 2008, Deepayan Sarkar wrote: > On 4/10/08, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: >> On 4/10/08, Aaron Arvey <[EMAIL PROTECTED]> wrote: >> > Apologetic prologue: I've looked through the mailing list for an answer to >> > this (since I'm sure it's trivial) but I have not been ab

Re: [R] Degrees of freedom in binomial glm

2008-04-10 Thread Prof Brian Ripley
You don't have 168 observations - 2 of them have no data (Freq = 0). On Thu, 10 Apr 2008, Giovanni Petris wrote: Hello, I am looking at the job satisfaction data below, from a problem in Agresti's book, and I am not sure where the degrees of freedom come from. The way I am fitting a binomial

[R] Fixing the physical size of Trellis graphs panels

2008-04-10 Thread Sébastien
Dear R-users, Please consider the following script: # library(lattice) ID <- rep(1:8,each=2) x <- rep (c(1,2),8) y <- c(rep(c(0.5,2),4),rep(c(50,1000),4)) df<-data.frame(ID,x,y) g <- rep(1:2,each=8) df.split<-split(df,g) df.split pdf(file="C:/Test.pdf") for (i in 1:2) { mydf<-as.data.fram

Re: [R] Relational Databases or XML?

2008-04-10 Thread Martin Morgan
Harold -- you'll really want to check out the XML package. xmlTreeParse + xpathApply provides a very flexible solution. As a recent example, parsing 189 XML files to extract 4 attributes from deeply nested elements into a data frame: fls <- list.files('~/runBrowser', pattern=".*xml", full=TRUE)

Re: [R] Fixing the physical size of Trellis graphs panels

2008-04-10 Thread Deepayan Sarkar
On 4/10/08, Sébastien <[EMAIL PROTECTED]> wrote: > Dear R-users, > > Please consider the following script: > > # > > library(lattice) > ID <- rep(1:8,each=2) > x <- rep (c(1,2),8) > y <- c(rep(c(0.5,2),4),rep(c(50,1000),4)) > df<-data.frame(ID,x,y) > g <- rep(1:2,each=8) > df.split<-sp

Re: [R] mixture distribution analisys

2008-04-10 Thread Ingmar Visser
The CRAN task view on cluster and mixture models likely has what you need. hth, Ingmar http://cran.r-project.org/web/views/Cluster.html On Apr 10, 2008, at 11:20 PM, Antonio Olinto wrote: > Hello, > > I'm analyzing some fish length-frequency data to access relative > age and growth > informa

  1   2   >