Re: [R] Partial Derivatives in R

2009-05-11 Thread spencerg
Hi, Paul: Your example is so complicated that I don't want to take the time to check it. You apply "deriv" to an exponential divided by a sum of exponentials, and I'm not convinced that your manual "Correct way" is actually correct. It looks like you've followed the examples in the "

[R] Can anyone suggest some r packages for Experimental Designs, specifically for choice and conjoint??? (or is intersted in helping me make 1)

2009-05-11 Thread Chris Howden
Afternoon everyone, I've spent the last week or so looking at all the experimental design packages I can find in R. AlgDesign, design.conf and BHH2 being the best one I could find. Unfortunately none of these do a particularly good job for complex designs, in particular for conjoint or disc

Re: [R] How to generate pdf in more than 1 papes

2009-05-11 Thread Yihui Xie
pdf() WILL draw all graphs in a single pdf file by default (onefile = TRUE) # you didn't tell us your R version > R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 9.0 year

[R] How to generate pdf in more than 1 papes

2009-05-11 Thread Xiaogang Yang
I have a problem, everytime I plot in pdf, I could only draw in one page, does anyone know how to generate more than one page for example, I have 10 pics to plot in pdf, each page only could be plotted 5 pics, so how can I generate just one pdf of 2 pages, instead of two pdf Thank you -- Xiaog

Re: [R] Warning trying to plot -log(log(survival))

2009-05-11 Thread Steven McKinney
Hi John, Thanks for the data. I put your data in a plain text file and read it in without any problems. > jsdf <- read.csv("js.csv") > jsdf Time Time30 Died Age Rx 1 3 0.1000 40 2 2 8 0.2671 21 2 310 0.3331 18 2 412 0.4000 42 2 5

Re: [R] Warning trying to plot -log(log(survival))

2009-05-11 Thread John Sorkin
Time30 is simply Time/30 and reflects months of follow-up. A copy of my data follows: Time,Time30,Died,Age,Rx 3,0.1,0,40,2 8,0.26667,1,21,2 10,0.3,1,18,2 12,0.4,0,42,2 16,0.5,1,23,2 17,0.56667,1,21,2 22,0.7,1,13,2 64,2.1,0,20,2 65,2.16667,0,15,2 77,2.5666

Re: [R] Warning trying to plot -log(log(survival))

2009-05-11 Thread Steven McKinney
Hi John, I can't reproduce your case with built-in data sets. Your data set is small. Can you show the data for the variables involved in your example? (Time30, Died, Rx, Age) Steven McKinney, Ph.D. Statistician Molecular Oncology and Breast Cancer Program British Columbia Cancer Researc

Re: [R] Set working directory by dragging text file onto R shortcut? [WinXP, unfortunately]

2009-05-11 Thread Gabor Grothendieck
One additional way to use this is to place RGuiStart.bat on your desktop and then you can drag a folder to it. On Mon, May 11, 2009 at 7:14 PM, Gabor Grothendieck wrote: > There are a several possibilities using batchfiles whose > home page is at: > > http://batchfiles.googlecode.com > > When on

[R] times family unavailable in postscript device (Ubuntu Linux)

2009-05-11 Thread Paul Johnson
I'm running Ubuntu 9.04. I could use some advice about fonts in postscript devices. > sessionInfo() R version 2.9.0 (2009-04-17) i486-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NA

Re: [R] how to specify xlim in forestplot

2009-05-11 Thread C.H.
The plot function in meta (not rmeta) can specify xlim. http://cran.r-project.org/web/packages/meta/index.html Regards, CH On Tue, May 12, 2009 at 9:08 AM, Waverley wrote: > Hi, > > I am using rmeta forestplot function.  The values to plot and their > 95% upper and lower are of both positive

[R] how to specify xlim in forestplot

2009-05-11 Thread Waverley
Hi, I am using rmeta forestplot function. The values to plot and their 95% upper and lower are of both positive and negative values such that I need to specify the x axis range. Looks like forestplot can only allow positive values for x. Is that true? Can someone help me? in plot you can just

Re: [R] Looking for a quick way to combine rows in a matrix

2009-05-11 Thread jim holtman
Try this: > key <- rownames(a) > key[key == "AT"] <- "TA" > do.call(rbind, by(a, key, colSums)) V2 V3 V4 V5 AA 1 5 9 13 TA 5 13 21 29 TT 4 8 12 16 On Mon, May 11, 2009 at 4:53 PM, Crosby, Jacy R wrote: > I'm working with genotype data in a frequency table: > > > a=matrix(1:16, nrow=4)

[R] Bootstrap error rate of logistic disrmination model

2009-05-11 Thread bigi001 bigi001
Hi, i am trying to find an appopriate R function which will estimate the bias associated with the apparent error rate of my logistic discriminant model (groups = 2, covariates = 3). I have read that bootstrapping can be used for this. Does anyone have any ideas on how I can go about doing this? I

Re: [R] Set working directory by dragging text file onto R shortcut? [WinXP, unfortunately]

2009-05-11 Thread Duncan Murdoch
On 11/05/2009 6:30 PM, Mark Na wrote: Hi R-helpers, I must use WinXP at work, and I'm missing a particular feature that's available in R on my Mac at home... In WinXP I would like to launch R by dragging and releasing a text file on top of the R shortcut on my desktop. Then, I would like the wo

Re: [R] Plot bivariate joint pdf

2009-05-11 Thread beetle2
Thank you for your suggestions. When you talked about the double itegral did you mean solve the pdf for 1 variable by \int \int_{0}^{1} X+y dydx x^2/2 + x/2 Where this is a function of one variable. Do I then plot this function ? regards David Winsemius wrote: > > > On May 11, 2009, at 9

Re: [R] Set working directory by dragging text file onto R shortcut? [WinXP, unfortunately]

2009-05-11 Thread Gabor Grothendieck
There are a several possibilities using batchfiles whose home page is at: http://batchfiles.googlecode.com When on that home page note that there are different versions of these utilities for XP and Vista. There are two utilities that could be used. Description is for Vista so for XP you may ha

Re: [R] R and McAfee 8.5

2009-05-11 Thread Bernardo Rangel Tura
On Mon, 2009-05-11 at 09:54 -0300, Joyce, Warren wrote: > Hi, > > I have been working with R for the last year and using the UKFSST package to > look at satellite tag track data and SST information. Fpr those not familiar, > the package uses the positions estimated by the satellite tags themselv

[R] Set working directory by dragging text file onto R shortcut? [WinXP, unfortunately]

2009-05-11 Thread Mark Na
Hi R-helpers, I must use WinXP at work, and I'm missing a particular feature that's available in R on my Mac at home... In WinXP I would like to launch R by dragging and releasing a text file on top of the R shortcut on my desktop. Then, I would like the working directory to be automatically set

[R] inconsistent results for axis.POSIXct

2009-05-11 Thread Dan Kelley
Some time ago, I posted a note about what I considered to be a bug in axis.POSIXt() for R 2.8.x, relating to whether timezones in the data are obeyed on the axes. A link to that note, and to a quick and helpful response, is at the following URL http://www.nabble.com/patch-for-axis.POSIXct-%28re

[R] Add data count to plot?

2009-05-11 Thread MikSmith
Hi I'm a relative newbie to R and had a query concerning plotting. I have generated a par(mfrow = c(2, 2)) graphic with 10 rose diagrams using circular. What I wanted to add to each individual plot was "n = x" for the number of data observations in each dataset. How might I go about doing this??

Re: [R] Read many .csv files into an R session automatically, without specifying filenames

2009-05-11 Thread Rolf Turner
On 12/05/2009, at 8:41 AM, Andreas Christoffersen wrote: I really dont know hot to use it - but have a look at ?source No; ``source'' is irrelevant here. On Mon, May 11, 2009 at 10:37 PM, Mark Na wrote: Hi R-helpers, I would like to read into R all the .csv files that are in my

Re: [R] Read many .csv files into an R session automatically, without specifying filenames

2009-05-11 Thread baptiste auguie
Hi, I once made this function (essentially the same as Romain), assignFiles <- function (pattern = "csv", strip = "(_|.csv|-| )", ...) # strip is any pattern you want to remove from the filenames { listFiles <- list.files(pattern = pattern, all.files = FALSE, full.names = FALSE,

[R] stepAIC + cox.zph

2009-05-11 Thread Eric Rescorla
Hi, I'm using stepAIC with a CoxPH model on some data. As we expect, there are a bunch of predictors, and stepAIC throws some out and then converges on others. Anyway, when I run cox.zph on the final model, I get some evidence of Beta(t) time dependence. Should I be concerned about the impact of

Re: [R] Beyond double-precision?

2009-05-11 Thread Stavros Macrakis
On Sat, May 9, 2009 at 12:17 PM, Berwin A Turlach wrote: > log(H) = log(n) - log( 1/x_1 + 1/x_2 + ... + 1/x_n) >...But we need to calculate the logarithm of a sum from the logarithms of the >individual terms. > ...The way to calculate log(x+y) from lx=log(x) and ly=log(y) ... >  max(lx,ly) + log

Re: [R] Read many .csv files into an R session automatically, without specifying filenames

2009-05-11 Thread Mose
Woo, global jinx! On Mon, May 11, 2009 at 1:55 PM, Romain Francois wrote: > > Hi, > > Something like this perhaps: > > files <- dir( pattern = "\\.csv$" ) > for( x in files){ > assign( sub( "\\.csv$", "", x ) , read.csv(x), envir = .GlobalEnv ) > } > > Romain > > Mark Na wrote: > >> Hi R-help

Re: [R] Read many .csv files into an R session automatically, without specifying filenames

2009-05-11 Thread Romain Francois
Hi, Something like this perhaps: files <- dir( pattern = "\\.csv$" ) for( x in files){ assign( sub( "\\.csv$", "", x ) , read.csv(x), envir = .GlobalEnv ) } Romain Mark Na wrote: Hi R-helpers, I would like to read into R all the .csv files that are in my working directory, without havin

[R] Looking for a quick way to combine rows in a matrix

2009-05-11 Thread Crosby, Jacy R
I'm working with genotype data in a frequency table: > a=matrix(1:16, nrow=4) > rownames(a)=c("AA","AT","TA","TT") > a [,1] [,2] [,3] [,4] AA159 13 AT26 10 14 TA37 11 15 TT48 12 16 'AT' and 'TA' are essentially the same, and I'd like to combine

Re: [R] Read many .csv files into an R session automatically, without specifying filenames

2009-05-11 Thread Andreas Christoffersen
I really dont know hot to use it - but have a look at ?source On Mon, May 11, 2009 at 10:37 PM, Mark Na wrote: > Hi R-helpers, > > I would like to read into R all the .csv files that are in my working > directory, without having to use a read.csv statement for each file. > > Each .csv would be r

[R] Read many .csv files into an R session automatically, without specifying filenames

2009-05-11 Thread Mark Na
Hi R-helpers, I would like to read into R all the .csv files that are in my working directory, without having to use a read.csv statement for each file. Each .csv would be read into a separate dataframe which would acquire the filename of the .csv. As an example: Mark<-read.csv("Mark.csv") ...

Re: [R] Quantile Regression fixed effects model

2009-05-11 Thread Thuy T. Nguyen
Dear R-users, I am applying professor Koenker's code for fixed effect quantile regression. However, I need to bootstrap and cluster the standard errors in my fitted model. Assuming that I need to bootstrap then cluster the standard errors by s (the strata indicator in Prof. Koenker's code), what

Re: [R] explanation - what does R in the background?

2009-05-11 Thread Bert Gunter
?Startup should help. Bert Gunter Nonclinical Biostatistics 467-7374 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Martin Batholdy Sent: Monday, May 11, 2009 12:53 PM To: r-help@r-project.org Subject: [R] explanation - what doe

[R] explanation - what does R in the background?

2009-05-11 Thread Martin Batholdy
for an undergraduate course in working with R I would like to explain the R-environment and the associated file system. But I am not sure if I have understand all of that correctly myself. Is there a document or a website out there which explains that in an understandable way? Things like; w

[R] Warning trying to plot -log(log(survival))

2009-05-11 Thread John Sorkin
windows xp R 2.8.1 I am trying to plot the -log(log(survival)) to visually test the proportional hazards assumption of a Cox regression. The plot, which should give two lines (one for each treatment) gives only one line and a warning message. I would appreciate help getting two lines, and an ex

Re: [R] Do you use R for data manipulation?

2009-05-11 Thread Emmanuel Charpentier
Le lundi 11 mai 2009 à 23:20 +0800, ronggui a écrit : [ Snip... ] > > But, at least in my trade, the ability to handle Excel files is a must > > (this is considered as a standard for data entry. Sigh ...). [ Re-snip... ] > I don't think Excel is a standard tool for data entry. Epidata entry >

Re: [R] Error in NLME (nonlinear mixed effects model)

2009-05-11 Thread Ben Bolker
Lindsay Banin wrote: > > Hi there, > > I have been trying to fit an NLME to my data. My dataset has two category > levels - one is a fixed effect (level1) and one is a random effect > (level2), though so far I have only experimented with the highest level > grouping (fixed, level1), with the f

Re: [R] Building US maps in R

2009-05-11 Thread stefan.d...@gmail.com
Hi DD, if you have a .shp file (which in principal should exist of the kind of map your describing) you can load into R using this packages: http://r-spatial.sourceforge.net/ In addition, there is also the R-Geo list which is much more suited for this kind of questions: r-sig-...@stat.math.ethz.c

[R] consultation

2009-05-11 Thread Nancy Tejerina
*Dear R Users;* * * *I´m writing to ask you how can I do Survivals Curves using Time-dependent covariates? Which packages I need to Install?* *Thanks for your help, I look foward you reply.* ** *Sincerelly.* ** *Nancy Tejerina.* [[alternative HTML version deleted]]

[R] Error in NLME (nonlinear mixed effects model)

2009-05-11 Thread Lindsay Banin
Hi there, I have been trying to fit an NLME to my data. My dataset has two category levels - one is a fixed effect (level1) and one is a random effect (level2), though so far I have only experimented with the highest level grouping (fixed, level1), with the following code: mod1 <- nlme(H ~ a*(

Re: [R] Do you use R for data manipulation?

2009-05-11 Thread Dimitri Liakhovitski
I am not a statistician and not a computer scientist by education. I consider myself an R novice and came to R - thanks to my boss - from an SPSS background. I work for a market research company and the most typical data files we deal with are not huge - up to several thousand rows and up to a thou

[R] robustbase: cannot install

2009-05-11 Thread Agustin Lobo
This is really odd, I've installed the binary of robustbase through synaptic on an ubuntu 8.04 machine and get: > library(robustbase) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/lib/R/site-library/robustbase/libs/robustbase.so': libRlapack.so: cann

[R] maxLik package

2009-05-11 Thread amene kheradmandi
Hi all. Recently i have been used maxlik package for optimizing a function with 5 parameters but i couldn't define gradient argument in function maxLik; How i can define a command to receive my goal? Whether I can change the core of this package?   Thanks for your attention and reply A. kherad

Re: [R] anyone know how to calculate chi square value from P val

2009-05-11 Thread Ted Harding
On 11-May-09 19:36:00, Anyuan Guo wrote: > Dear all, > I have P value of a list of markers. Now I need the chi square > value with degrees of freedom 2. > I noticed there are several Chisquare functions (dchisq, pchisq, > qchisq, and rchisq), but it seems all are not for my purpose. >

Re: [R] Hoe to get RESIDUAL VARIANCE in logistic regression using lmer

2009-05-11 Thread tomal
Thank you very much Mr Onkelinx, I appreciated your answer. I'm sorry about my lack of knowledge on this subject, but I don't understand why residual variance is fixed at 1 with the binomial family and I didn't manage to find any exhaustive explanation for that. May you kindly suggest me some ref

Re: [R] Hoe to get RESIDUAL VARIANCE in logistic regression using lmer

2009-05-11 Thread tomal
Thank you very much Mr Onkelinx, I appreciated your answer. I'm sorry about my lack of knowledge on this subject, but I don't understand why residual variance is fixed at 1 with the binomial family and I didn't manage to find any exhaustive explanation for that. May you kindly suggest me some ref

Re: [R] anyone know how to calculate chi square value from P value?

2009-05-11 Thread R. A. Bilonick
On Mon, 2009-05-11 at 12:36 -0700, Anyuan Guo wrote: > Dear all, > I have P value of a list of markers. Now I need the chi square value > with degrees of freedom 2. > I noticed there are several Chisquare functions (dchisq, pchisq, > qchisq, and rchisq), but it seems all are not for my pu

[R] Partial correlation function required

2009-05-11 Thread Moumita Das
-- Forwarded message -- From: Date: Mon, May 11, 2009 at 10:24 PM Subject: The results of your email commands To: das.moumita.onl...@gmail.com The results of your email command are provided below. Attached is your original message. - Results: Ignoring non-text/plain MIME part

Re: [R] Plotting colors on a world map

2009-05-11 Thread Duncan Murdoch
On 5/11/2009 10:32 AM, dxc13 wrote: Hi useR's I have created a simple map of the world using the following code: m <- map(xlim=c(-180,180), ylim=c(-90,90)) map.axes() I then create a grid of dimension 36x72 using the code: map.grid(m, nx=72, ny=36, labels=FALSE, col="black") This gives 2592 gr

Re: [R] anyone know how to calculate chi square value from P value?

2009-05-11 Thread Duncan Murdoch
On 5/11/2009 3:36 PM, Anyuan Guo wrote: Dear all, I have P value of a list of markers. Now I need the chi square value with degrees of freedom 2. I noticed there are several Chisquare functions (dchisq, pchisq, qchisq, and rchisq), but it seems all are not for my purpose. In microso

Re: [R] Plot bivariate joint pdf

2009-05-11 Thread David Winsemius
On May 11, 2009, at 9:46 AM, Ben Bolker wrote: beetle2 wrote: For a homework question. I was wondering if rcmdr has a function to plot a graph of a bivariate function of X and Y. I have a function with joint pdf fX,Y(x,y) = x+y for 0 x <- seq(0,1,.001) y <- seq(0,1,.001) r = x+y plot(r

[R] anyone know how to calculate chi square value from P value?

2009-05-11 Thread Anyuan Guo
Dear all, I have P value of a list of markers. Now I need the chi square value with degrees of freedom 2. I noticed there are several Chisquare functions (dchisq, pchisq, qchisq, and rchisq), but it seems all are not for my purpose. In microsoft excel, there is a function CHINV to do th

Re: [R] predict function the other way around

2009-05-11 Thread David Winsemius
Why not use the x=T and y=T paramemters and see if : linearmodel=lm(y~x, x=T, y=T)linearmodel$model (linearmodel$model) y x 1 2 1 2 4 2 3 6 3 4 8 4 5 10 5 give you useful results. If you want to interpolate or extrapolate, then search for threads regarding those tasks. -- David W

Re: [R] R errors when trying to read a file

2009-05-11 Thread Prof Brian Ripley
On Mon, 11 May 2009, Dennis Fisher wrote: Colleagues, I have encountered a problem in version 2.9 of R, running in both Vista and OS X. My code is quite lengthy but the critical line is: if (file.exists(FILENAME)) readLines(FILENAME)) This triggers the error: Error in f

Re: [R] Problems to run SVM regression with e1071

2009-05-11 Thread Max Kuhn
Is the variable st character or a factor? What does str(train$st) show? -- Max __ 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/posting-guide.html and provide c

Re: [R] working with groups of labels?

2009-05-11 Thread Richard . Cotton
It seems that the structure of your data is that you have two groups ("Real Bad Stuff" and "Other Crazy Things") which are then subdivided into further categories. I'd be tempted to set your data up like this: dfr <- data.frame( score=c(23, 14, 17, 8, 43, 13), group=rep(c("Real Bad Stuff"

Re: [R] Removing any text beginning with...

2009-05-11 Thread jim holtman
Is this what you want (using regular expressions): > x <- "ENSG /// ENSGy /// ENSG" > sub("^([[:alpha:]]+).*", "\\1 ", x) [1] "ENSG" > On Mon, May 11, 2009 at 9:01 AM, Amélie Baud wrote: > Hi ! > > >From an Ensembl annotation like ENSG /// ENSGy /// ENSG, I am > tr

Re: [R] Beyond double-precision?

2009-05-11 Thread Greg Snow
A large chunk of the function below could be replaced with a call to the Reduce function. I don't know if it would be faster, slower, or depend on the situation, but it might make it a little more readable. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s

Re: [R] need help with chisq

2009-05-11 Thread JC
Thank you Stephanie. This is perfect! On May 10, 12:34 pm, Stephanie Kovalchik wrote: > JC, > > If each row are the counts for a 2 x 2 contingency table - so for the   > ith contingency table you have counts for row 1 c(Y08[i],Z08[i]) and   > row 2 (Y09[i],Z09[i]) then you could use apply: > > X

[R] R errors when trying to read a file

2009-05-11 Thread Dennis Fisher
Colleagues, I have encountered a problem in version 2.9 of R, running in both Vista and OS X. My code is quite lengthy but the critical line is: if (file.exists(FILENAME)) readLines(FILENAME)) This triggers the error: Error in file(con, "r") : cannot open the connection

Re: [R] Reading large files quickly; resolved

2009-05-11 Thread Rob Steele
Rob Steele wrote: > I'm finding that readLines() and read.fwf() take nearly two hours to > work through a 3.5 GB file, even when reading in large (100 MB) chunks. > The unix command wc by contrast processes the same file in three > minutes. Is there a faster way to read files in R? > > Thanks! >

Re: [R] Histogram frequencies with a normal pdf curve overlay

2009-05-11 Thread Greg Snow
You may also want to look at the rootogram function in the vcd package. You could also use the updateusr function in the TeachingDemos package to reset the y-scale before plotting the curve (works well if you just want the shape of the curve, probably more work than the other suggestions if you

Re: [R] What does it mean by skip=2 and skip=7?

2009-05-11 Thread Richard . Cotton
> Can anyone tell me what is skip=2, skip =7 >From ?read.csv: "skip: integer: the number of lines of the data file to skip before beginning to read data." > and %in% mean here? %in% matches values; see ?'%in%', and example('%in%') Regards, Richie. Mathematical Sciences Unit HSL --

Re: [R] working with groups of labels?

2009-05-11 Thread Phillip Porter
At 9:25 PM +1000 5/11/09, Jim Lemon wrote: >Hi Phillip, >I'm not exactly sure how you are positioning the labels. Is it >possible to give us an example with some data that will produce a >plot to show what you want? It shouldn't be too hard to do. > >Jim Data is something along the lines of: v

[R] Plot bivariate joint pdf

2009-05-11 Thread beetle2
For a homework question. I was wondering if rcmdr has a function to plot a graph of a bivariate function of X and Y. I have a function with joint pdf fX,Y(x,y) = x+y for 0 x <- seq(0,1,.001) > y <- seq(0,1,.001) > r = x+y > plot(r) but it seems to just add them together say .2+.2 .3+.3 not ot

[R] Seewave options

2009-05-11 Thread Thiago de Carvalho
Good afternoon, My name is Thiago. I'm a graduate student and affiliated to an Anuran Bioacustic and Systematics Laboratory at UFU (Federal University of Uberlândia) in Brazil. The professor in charge of the lab (Dr. Ariovaldo Antonio Giaretta) and I have recently been making use of R, spec

[R] Plotting colors on a world map

2009-05-11 Thread dxc13
Hi useR's I have created a simple map of the world using the following code: m <- map(xlim=c(-180,180), ylim=c(-90,90)) map.axes() I then create a grid of dimension 36x72 using the code: map.grid(m, nx=72, ny=36, labels=FALSE, col="black") This gives 2592 grid cells. In a separate data set of

[R] R and McAfee 8.5

2009-05-11 Thread Joyce, Warren
Hi, I have been working with R for the last year and using the UKFSST package to look at satellite tag track data and SST information. Fpr those not familiar, the package uses the positions estimated by the satellite tags themselves and the associated SST data from servers (in this case, from t

[R] Removing any text beginning with...

2009-05-11 Thread Amélie Baud
Hi ! >From an Ensembl annotation like ENSG /// ENSGy /// ENSG, I am >trying to keep only the first part: ENSG. I wasn't able to find any >helpful information about how to do it. Could you help me with that please ? >Is the use of the equivalent to the Excel * (any text) a good w

Re: [R] Legend in plots

2009-05-11 Thread Jorge Ivan Velez
Dear Mafalda, ?legend is what you are looking for. Take a look at the help page. Here is one way to do what you asked for: legend('topleft', c('A','B','C'),lty=1, col=c(1,2,4)) HTH, Jorge On Mon, May 11, 2009 at 11:26 AM, Mafalda Viana wrote: > Dear R users, > > I have what I think it is a v

[R] Legend in plots

2009-05-11 Thread Mafalda Viana
Dear R users, I have what I think it is a very simple question concerning plots in R. If you could help me I would be very grateful. How can I include a legend in my plot? Below I give an example of my data and the code I am using. What I wish to accomplish is a legend saying that the black line

Re: [R] Do you use R for data manipulation?

2009-05-11 Thread ronggui
2009/5/6 Emmanuel Charpentier : > Le mercredi 06 mai 2009 à 00:22 -0400, Farrel Buchinsky a écrit : >> Is R an appropriate tool for data manipulation and data reshaping and data >> organizing? > [ Large Snip ! ... ] > > Depends on what you have to do. > > I've done what can be more or less termed "

[R] predict function the other way around

2009-05-11 Thread Gerrit Voigt
Dear List, Consider the following example x=c(1,2,3,4,5) y=c(2,4,6,8,10) linearmodel=lm(y~x) To predict a y-value if you know the corresponding x value is very easy with the command predict. predict(linearmodel, newdata=(x=1.5)) The other way around, to predict an x-value with a correspondin

Re: [R] Citing R/Packages Question

2009-05-11 Thread stephen sefick
I have have a package that I wrote called StreamMetabolism; which I use to calculate single station stream metabolism from diurnal oxygen curves. I would love to publish something about it (I am also an entering PhD student and need publications); however, I am not sure the applicability out side

[R] Rcompression on Omegahat

2009-05-11 Thread Dieter Menne
I tried to install Rcompression (for reading Matlab files) options(CRAN = c(getOption("CRAN"), "http://www.omegahat.org/R";)) install.packages("Rcompression") Warning: unable to access index for repository http://www.omegahat.org/R/bin/windows/contrib/2.9 Warning message: In getDependencies(pkgs

[R] Inconsistency in representation of variables

2009-05-11 Thread Stavros Macrakis
In stats::D, I was wondering why variables are represented as symbols in expressions, but as strings in lists of variables: D(quote(x^2),"x") => 2*x D(quote(x^2),quote(x)) => error Variable must be a character string Strings are not allowed in the expression to denote variables: D(qu

Re: [R] Searching within a ch. string

2009-05-11 Thread Luc Villandre
Hi Ron, Look up the grep() function. Cheers, -- *Luc Villandré* /Biostatistician McGill University Health Center - Montreal Children's Hospital Research Institute/ RON70 wrote: Hi all, is there any function to find some words in a character-string? For example suppose the string is : "gdfsa-s

Re: [R] Searching within a ch. string

2009-05-11 Thread Gabor Grothendieck
The following is TRUE if the indicated string is found: regexpr("sdhch", "gdfsa-sdhchc-88") > 0 See ?regexpr Either of the next two will break up a string into words. The first needs to know the delimiters whereas the second needs to know the contents: > strsplit("gdfsa-sdhchc-88", "\\W+")[[1]]

Re: [R] Searching within a ch. string

2009-05-11 Thread Duncan Murdoch
On 5/11/2009 10:07 AM, RON70 wrote: Hi all, is there any function to find some words in a character-string? For example suppose the string is : "gdfsa-sdhchc-88", now I want to find whether this string contains "sdhch". Is there any R function to do that? See ?grep. There are several functions

Re: [R] R Error, very odd....

2009-05-11 Thread Don MacQueen
At 12:37 AM -0700 5/11/09, Katie2009 wrote: hi dieter, the method i'm using is in excel, copying the data, then in r w<-read.delim("clipboard") w<-as.data.frame(w) i've been doing a bit more fiddling, and have identified the 'class' of the column that i'm having trouble with, is classifi

Re: [R] Using ACE in the ape package

2009-05-11 Thread Ben Bolker
Andrew RODRIGUES wrote: > > Having a problem running the ace command in ape. > > After reading my table into R and then putting the names of the rows in > the > table in same order as the tree I can't get ace to run and get the message > > Erreur dans as.matrix(x) : > dims [produit 25] n

[R] Searching within a ch. string

2009-05-11 Thread RON70
Hi all, is there any function to find some words in a character-string? For example suppose the string is : "gdfsa-sdhchc-88", now I want to find whether this string contains "sdhch". Is there any R function to do that? Regards, -- View this message in context: http://www.nabble.com/Searching-w

[R] dimnames do not match array extent

2009-05-11 Thread Penner, Johannes
Dear adegenet users, I am trying to calculate geographical barriers using "monmonier". However, I consistently get the error "dimnames do not match array extent". - import of the distance matrix: read.table - conversion 1: as.dist(data, diag=TRUE, upper =TRUE) - conversion 2: as.matrix(data) - i

[R] Ancestral Character Estimation

2009-05-11 Thread Andrew RODRIGUES
Hello, I was just wondering whether with the ace command in ape it was possible to incorporate polymorphic characters in ancestral character estimation. I am currently working with distibutions and often distributions are not restricted to a single geographic area. Thanks for any help. _

Re: [R] Citing R/Packages Question

2009-05-11 Thread Ravi Varadhan
It would be nice if each package went through a peer-review and had a related publication (either in R-news or J Stat Soft). This publication can then be used as the official citation for the package. However, this still would not address updates and versions of the package. Ravi. ---

Re: [R] Plot bivariate joint pdf

2009-05-11 Thread Ben Bolker
beetle2 wrote: > > For a homework question. > I was wondering if rcmdr has a function to plot a graph of a bivariate > function of X and Y. > I have a function with joint pdf > > fX,Y(x,y) = x+y for 0 > I've tried >> x <- seq(0,1,.001) >> y <- seq(0,1,.001) >> r = x+y >> plot(r) > > but it

[R] Problems to run SVM regression with e1071

2009-05-11 Thread Marlene Marchena
Hi R users, I'm trying to run a SVM - regression using e1071 package but the function svm() all the time apply a classification method rather than a regression. svm.m1 <- svm(st ~ ., data = train, cost = 1000, gamma = 1e-03) Parameters: SVM-Type: C-classification SVM-Kernel:

[R] Import Visual FoxPro (.dbf)

2009-05-11 Thread Andy Choens
I have a large series of Visual FoxPro (.dbf) files that I want to convert to a plain text (.csv) file. I wrote a quick script to do all of this for me. With a little tweaking it seemed to work like a charm. But, when I looked at my newly created text files carefully, I discovered a problem. Every

Re: [R] readBin: read from defined offset TO defined offset?

2009-05-11 Thread Duncan Murdoch
On 11/05/2009 7:05 AM, Johannes Graumann wrote: Hello, With the help of "seek" I can start "readBin" from any byte offset within my file that I deem appropriate. What I would like to do is to be able to define the endpoint of that read as well. Is there any solution to that already out there?

Re: [R] Comparing COXPH models, one with age as a continuous variable

2009-05-11 Thread Terry Therneau
The "anova" process is only statistically valid for nested models, i.e., where one includes the other as a proper subset. A model with continuous age and one with discrete age are not nested; your p-value will be meaningless. Terry Therneau __ R-he

Re: [R] doubt

2009-05-11 Thread David Winsemius
You might try again, assuming you are a Windows user, which was suggested by your choice of repositories but not actually stated by you. The repository may have been temporarily unavailable. It seems to be open for service now with a version of cluster that is 1.11.13. -- David Winsemius On

Re: [R] Select the rows in a dataframe that matches a criteria in another dataframe

2009-05-11 Thread David Winsemius
On May 10, 2009, at 7:54 PM, David Winsemius wrote: ?subset ?"%in%" (I have gotten tired of converting dataframes that are presented in a non-executable form, such as is supported by the dput function. So, ... you should read those help pages and take the obvious path to success.) So

Re: [R] aggregate over x cases

2009-05-11 Thread baptiste auguie
good point, i forgot about head (!), library(plyr) ddply(d, .(block, trial), head, 2) block trial x y 1 1 1 605 150 2 1 1 603 148 3 1 2 607 148 4 1 2 605 152 On 11 May 2009, at 14:04, Gabor Grothendieck wrote: Try this: do.call(rbind, by(DF, DF[1:2], he

Re: [R] readBin: read from defined offset TO defined offset?

2009-05-11 Thread jim holtman
Can you be more specific on how you want to "define the endpoint of that read". What is the criteria you want to use? Can you read in a block and then search of the pattern? On Mon, May 11, 2009 at 7:05 AM, Johannes Graumann wrote: > Hello, > > With the help of "seek" I can start "readBin" fro

Re: [R] aggregate over x cases

2009-05-11 Thread jim holtman
Here is a way of doing it: > x block trial x y 1 1 1 605 150 2 1 1 603 148 3 1 1 604 140 4 1 1 600 140 5 1 1 590 135 6 1 1 580 135 7 1 2 607 148 8 1 2 605 152 10 1 2 600 158 > do.call(rbind, lapply(split(x, list

Re: [R] aggregate over x cases

2009-05-11 Thread Gabor Grothendieck
Try this: do.call(rbind, by(DF, DF[1:2], head, 2)) On Mon, May 11, 2009 at 7:49 AM, Jens Bölte wrote: > Hello, > > I have been struggling for quite some time to find a solution for the > following problem. I have a data frame which is organized by block and > trial. Each trial is represented acr

Re: [R] aggregate over x cases

2009-05-11 Thread baptiste auguie
try this, library(plyr) ddply(d, .(block, trial), function(.d) .d[1:2, ]) block trial x y 1 1 1 605 150 2 1 1 603 148 3 1 2 607 148 4 1 2 605 152 HTH, baptiste On 11 May 2009, at 13:49, Jens Bölte wrote: Hello, I have been struggling for quite some

[R] Amsterdam course - Pharmacokinetic and pharmacodynamic modeling and simulation

2009-05-11 Thread Dick Verkerk
LS, We would like to inform you about the new course "Pharmacokinetic and pharmacodynamic modeling and simulation" by Dr. Jan Freijer in Amsterdam, November 28th. The course is meant for users of R or S-PLUS in the bio-pharmaceutical sciences who would like to apply it to clinical trial simulati

[R] aggregate over x cases

2009-05-11 Thread Jens Bölte
Hello, I have been struggling for quite some time to find a solution for the following problem. I have a data frame which is organized by block and trial. Each trial is represented across several rows in this data frame. I'd like to extract the first x rows per trial and block. For example

[R] doubt

2009-05-11 Thread Rangasamy, Shanthi
Hi Sir, I want to install the package "cluster" in R language. I could be installing, but I cant load that package.. I have faced the following warning in installing time.. Warning: cannot remove prior installation of package 'cluster' So, I tried to update the package, but again I faced the f

Re: [R] Partial Derivatives in R

2009-05-11 Thread Paul Heinrich Dietrich
Hi Spencer, Thanks for suggesting the genD function. In attempting it, I have rearranged my function from phat1 ~ ... to ... - 1, it apparently doesn't like the first one :) But when I run it, it tells me the partials are all zero. I'm trying out a simple MNL equation before I expand it to what

Re: [R] working with groups of labels?

2009-05-11 Thread Jim Lemon
Phillip Porter wrote: Good Morning, I have a graph with groups of variables. I have include the group names as variables so that I can have them positioned correctly. Unfortunately this means that the group names have to follow all of the same rules as the variables within the groups. I woul

  1   2   >