Re: [R] Finding and moving files

2009-04-22 Thread Stephen J. Barr
If you are on unix/linux/mac/cygwin, you could do that in a shell script and call it with R. Although it is certainly do-able. Sent via BlackBerry from T-Mobile -Original Message- From: bill.venab...@csiro.au Date: Wed, 22 Apr 2009 12:51:37 To: dannyboy...@gmail.com;

Re: [R] My surprising experience in trying out REvolution's R

2009-04-22 Thread Dieter Menne
Jason Liao JLIAO at hes.hmc.psu.edu writes: I care a lot about R's speed. So I decided to give REvolution's R (http://revolution-computing.com/) a try, which bills itself as an optimized R. Note that I used the free version. My machine is a Intel core 2 duo under Windows XP professional.

[R] integrate lgamma from 0 to Inf

2009-04-22 Thread Andreas Wittmann
Dear R users, i try to integrate lgamma from 0 to Inf. But here i get the message roundoff error is detected in the extrapolation table, if i use 1.0e120 instead of Inf the computation works, but this is against the suggestion of integrates help information to use Inf explicitly. Using

[R] Merging data frames, or one column/vector with a data frame filling out empty rows with NA's

2009-04-22 Thread joe1985
Hello I have two data frames, SNP4 and SNP1: head(SNP4) Animal MarkerY 3213 194073197 P1001 0.021088 1295 194073197 P1002 0.021088 915 194073197 P1004 0.021088 2833 194073197 P1005 0.021088 1487 194073197 P1006 0.021088 1885 194073197 P1007 0.021088 head(SNP1)

[R] Copula package

2009-04-22 Thread Roslina Zakaria
Hi R-users, I would like to use the copula package.  I  the package plus the mvtnorm and try to run the example given, but I got the following message: install.packages(repos=NULL,pkgs=c:\\Tinn-R\\copula_0.8-3.zip) norm.cop - normalCopula(c(0.5, 0.6, 0.7), dim = 3, dispstr = un) t.cop -

Re: [R] automatic exploration of all possible loglinear models?

2009-04-22 Thread bartjoosen
Hi, you could also take a look at: http://www.nabble.com/finding-best-fitting-model-td22852224.html Bart ryancw wrote: Is there a way to automate fitting and assessing loglinear models for several nominal variables . . . something akin to step or drop1 or add1 for linear or logistic

Re: [R] Copula package

2009-04-22 Thread Pfaff, Bernhard Dr.
Dear Roslina, question: have you used 'library(copula)' somewhere before the call to 'normalCopula'? Bernhard -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Roslina Zakaria Gesendet: Mittwoch, 22. April 2009 09:45 An:

Re: [R] Generate bivariate binomial data

2009-04-22 Thread ONKELINX, Thierry
Thank you. This was very helpfull. Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,

[R] Intervention Time Series Analyis Tutorial/Package

2009-04-22 Thread Dominik Hattrup
Hi, I am looking for a tutorial giving an introduction into INTERVENTION Time Series Analysis using R. Or, if there is no tutorial, is there any package for Intervention Time Series Analysis? THX! Dominik -- Dominik Hattrup signature.asc Description: OpenPGP digital signature

Re: [R] DNAcopy package in R

2009-04-22 Thread Ramon Diaz-Uriarte
Dear Selena, You probably will want to try to run this in a computing cluster, parallelizing over samples. Best, R. On Tue, Apr 21, 2009 at 5:40 PM, Selena Niu yue@yale.edu wrote: Hi All: Has anyone analyzed Illumina 550K data using DNAcopy package? I have around 2300 samples.

[R] R: Color coded 3D plot

2009-04-22 Thread mauede
Thank you. This is what I need. Maura -Messaggio originale- Da: Kingsford Jones [mailto:kingsfordjo...@gmail.com] Inviato: mer 22/04/2009 7.30 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Color coded 3D plot The attachment didn't come through, but try:

[R] Better 'documenting' R? (Was: Re: bug when subtracting decimals?)

2009-04-22 Thread Gavin Simpson
On Tue, 2009-04-21 at 11:25 -0500, hadley wickham wrote: Have you read the posting guide and the FAQs? If you do not get a reply within two days, you may want to look at both and think about reformulating your query. Oh, and while you are at it, look through the archives, a lot of

[R] converting histogram to barchart

2009-04-22 Thread Thomas Fröjd
Hi list, After a lot of tweaking i have managed to create a histogram with an overlaying density plot. The histogram shows a sample of birth weights of babies and the density plot shows birth weights from a much larger reference populaton. My data is divided in 0.1 Kg bins so in the code below

Re: [R] how to inspect content of save file

2009-04-22 Thread Benno Pütz
Am 21.Apr.2009 um 19:16 schrieb Dimitri Liakhovitski: Can't you just read in the very first line of the file (that contains names)? Dimitri 2009/4/21 Benno Pütz pu...@mpipsykl.mpg.de: Is there a way of listing the variables contained in a file created with the save() command other than

Re: [R] broken example: lme() + multcomp() Tukey on repeated measures design

2009-04-22 Thread William Simpson
Thanks for the helpful replies. I will try updating R and see how it goes. MASS, nlme, multcomp are all the most recent. Bill On Tue, Apr 21, 2009 at 3:12 PM, William Simpson william.a.simp...@gmail.com wrote: I am trying to do Tukey HSD comparisons on a repeated measures expt. I found the

Re: [R] plotting with R

2009-04-22 Thread baptiste auguie
if it hasn't been suggested already: ggplot2 also has a book and a website: http://had.co.nz/ggplot2/ I would recommend any newcomer to have a look as it provides a clear, consistent and elegant syntax to produce very nice plots. baptiste On 22 Apr 2009, at 03:14, Erik Iverson wrote: In

Re: [R] Gee with nested desgin

2009-04-22 Thread Dimitris Rizopoulos
Hi Thierry, in geeglm() and in connection with the GEE theory, argument id should identify the independent sample units in your data set, which seem to be the plots. GEE will produce consistent estimates even if you misspecify the correlation structure in your data (i.e., ignore nested

Re: [R] graph with 15 combinations

2009-04-22 Thread Jim Lemon
Penner, Johannes wrote: Dear R helpers, I have a data set with 4 types (W, C, E S). Now I have values for all types plus all possible combinations (the order is unimportant): W, C, WC, E, WE, CE, WCE, S, WS, CS, WCS, ES, WES, CES WCES. Ideally I would like to represent everything in one graph

Re: [R] using Rmath in c-functions of R packages

2009-04-22 Thread Martin Maechler
VM == Volodymyr Melnykov volm...@iastate.edu on Tue, 21 Apr 2009 21:42:44 -0500 writes: VM On Tue, 21 Apr 2009 21:49:36 -0400 VM Duncan Murdoch murd...@stats.uwo.ca wrote: On 21/04/2009 9:39 PM, Volodymyr Melnykov wrote: Dear all, We have created an R

Re: [R] SEM package

2009-04-22 Thread Jim Lemon
John Fox wrote: Dear Tijana, I'm afraid that I can't entirely read the messages, but the problem doesn't look like it's peculiar to the sem package. It appears as if the package may have been properly installed but you didn't have permission to update HTML help links. If that's the case, then

Re: [R] R-help Digest, Vol 74, Issue 20

2009-04-22 Thread anupam sinha
Hi all, Presently I have R-2.6 version installed on my system. Because of this I am unable to install certain packages.Will an updatepackages() command help or would I have to uninstall the older version of R and then install the newer versions ? Can anyone help me out ? Thanks in

[R] paste( / ) and paste( /' )

2009-04-22 Thread Agustin Lobo
I wish to write using paste(), but paste(\,Hola,\,sep=) [1] \Hola\ while the same approach works with '' paste(\',Hola,\',sep=) [1] 'Hola' why this difference? how could I do it to get Hola ? Thanks Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra Jaume Almera (CSIC) LLuis

[R] [R-pkgs] Major revision of plink for separate calibration IRT-based linking

2009-04-22 Thread Jonathan Weeks
An updated version of the package plink has been uploaded to CRAN. This is a major revision that now includes multidimensional models and methods. plink is a package for conducting unidimensional and multidimensional IRT-based test linking using separate calibration methods for multiple groups

[R] Merging data frames, or one column/vector with a data frame filling out empty rows with NA's

2009-04-22 Thread Johannes G. Madsen
Hello I have two data frames, SNP4 and SNP1: head(SNP4) Animal MarkerY 3213 194073197 P1001 0.021088 1295 194073197 P1002 0.021088 915 194073197 P1004 0.021088 2833 194073197 P1005 0.021088 1487 194073197 P1006 0.021088 1885 194073197 P1007 0.021088

Re: [R] bug when subtracting decimals?

2009-04-22 Thread Martin Maechler
MS == Marc Schwartz marc_schwa...@me.com on Tue, 21 Apr 2009 08:06:46 -0500 writes: MS On Apr 21, 2009, at 5:55 AM, Duncan Murdoch wrote: On 21/04/2009 3:48 AM, Petr PIKAL wrote: Hi r-help-boun...@r-project.org napsal dne 20.04.2009 19:01:46: wolfgang.siewert

Re: [R] paste( / ) and paste( /' )

2009-04-22 Thread Duncan Murdoch
Agustin Lobo wrote: I wish to write using paste(), but paste() doesn't write anything, it constructs character vectors. It is the auto-printing that is adding the backslashes. Use cat() to write things without them: cat(paste(\,Hola,\,sep=)) Hola In fact, cat() is flexible and you

Re: [R] Gee with nested desgin

2009-04-22 Thread ONKELINX, Thierry
Dear Dimitris, Thanks for your prompt reply. I agree that the specification of the correlation structure in theory only affects the efficiency. But I noticed that the fixed effects change dramatically when comparing the unstructured correlation with my other attempts. With most models the effect

[R] Discover significant change in sorted vector

2009-04-22 Thread Hans-Henning Gabriel
Hi, suppose I have a simple sorted vector like this: a - c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46); Is there a function in R, I can use to discover that from index 8 to index 11 the values are changing significantly? The function should return a value pointing to one of the

Re: [R] Merging data frames, or one column/vector with a data frame filling out empty rows with NA's

2009-04-22 Thread Gabor Grothendieck
Try this (where SNP1x is same as SNP1 from your post but without the last line). If the merge below does not work on real data set due to size then try the sqldf alternative as it SNP1x - + structure(list(Animal = c(194073197L, 194073197L, 194073197L, + 194073197L, 194073197L), Marker =

[R] comparing mixture models (mix function in mixdist package)

2009-04-22 Thread Dieter Vanderelst
Dear List, We are using the mix() function in the mixdist package to fit mixture models to some of our data. The package provides a function to compare the fits of nested models using an ANOVA function. However, we were wondering whether there are methods that can be used to compare models

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Henrique Dallazuanna
Perhaps something about like this: which(diff(a) mean(diff(a))) On Wed, Apr 22, 2009 at 8:27 AM, Hans-Henning Gabriel hanshenning.gabr...@gmail.com wrote: Hi, suppose I have a simple sorted vector like this: a - c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46); Is there a function

Re: [R] Changing the binning of collected data

2009-04-22 Thread Jim Lemon
Lorenzo Isella wrote: Dear All, Apologies if this is too simple for this list. Let us assume that you have an instrument measuring particle distributions. The output is a set of counts {n_i} corresponding to a set of average sizes {d_i}. The set of {d_i} ranges from d_i_min to d_i_max either

Re: [R] Merging data frames, or one column/vector with a data frame filling out empty rows with NA's

2009-04-22 Thread David Winsemius
On Apr 22, 2009, at 5:22 AM, Johannes G. Madsen wrote: Hello I have two data frames, SNP4 and SNP1: head(SNP4) Animal MarkerY 3213 194073197 P1001 0.021088 1295 194073197 P1002 0.021088 915 194073197 P1004 0.021088 2833 194073197 P1005 0.021088 1487 194073197

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Jim Lemon
Hans-Henning Gabriel wrote: Hi, suppose I have a simple sorted vector like this: a - c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46); Is there a function in R, I can use to discover that from index 8 to index 11 the values are changing significantly? The function should return a value

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Hans-Henning Gabriel
Hans-Henning Gabriel wrote: Hi, suppose I have a simple sorted vector like this: a - c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46); Is there a function in R, I can use to discover that from index 8 to index 11 the values are changing significantly? The function should return a value

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread David Winsemius
On Apr 22, 2009, at 8:06 AM, Hans-Henning Gabriel wrote: Hans-Henning Gabriel wrote: Hi, suppose I have a simple sorted vector like this: a - c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46); Is there a function in R, I can use to discover that from index 8 to index 11 the values

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Gabor Grothendieck
Try this: a - c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46); ix - seq_along(a) library(strucchange) bp - breakpoints(a ~ ix, h = 4) bp Optimal 3-segment partition: Call: breakpoints.formula(formula = a ~ ix, h = 4) Breakpoints at observation number: 7 11 Corresponding to

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Charles Annis, P.E.
Please excuse my nit-picking: In physicists the third and fourth derivative of position are jerk (or jolt) and jounce, respectively. Impulse is the integral of force with respect to time. Charles Annis, P.E. charles.an...@statisticalengineering.com phone: 561-352-9699 eFax: 614-455-3265

Re: [R] plotting with R

2009-04-22 Thread Christof Winter
Bala subramanian wrote, On 04/21/09 17:07: Friends, i) I am new to R. Kindly suggest some resources that has examples of plotting with R. I really like: http://zoonek2.free.fr/UNIX/48_R/03.html Cheers, Christof -- Christof Winter Bioinformatics Group Biotechnologisches Zentrum Technische

Re: [R] plotting with R

2009-04-22 Thread stephen sefick
check out ggplot2 there is an entire website devoted to the package (and a book also). The R graph gallery has graphs and the code to produce the graphs. hope this helps Stephen Sefick On Wed, Apr 22, 2009 at 9:01 AM, Christof Winter win...@biotec.tu-dresden.de wrote: Bala subramanian wrote,

Re: [R] Merging data frames, or one column/vector with a data frame filling out empty rows with NA's

2009-04-22 Thread Sarah Goslee
Hi, How about this: SNP5 - merge(SNP4, SNP1[,2:3], all.x=TRUE) SNP5 MarkerAnimal Y x 1 P1001 194073197 0.021088 2 2 P1002 194073197 0.021088 1 3 P1004 194073197 0.021088 2 4 P1005 194073197 0.021088 0 5 P1006 194073197 0.021088 2 6 P1007 194073197 0.021088 0 This

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Hans-Henning Gabriel
Gabor, initially this looked like the perfect solution, exactly what I need. Unfortunately it is too expensive/costly. I have vectors of length 800 and more, my machine needs 5 minutes (I aborted) to compute the breakpoints. Required is computation time 1 sec. :) Any other suggestions?

[R] read.table or read.csv without row index?

2009-04-22 Thread tsunhin wong
Hello all, Probably my concepts about the data.frame and matrix and array in R are not clear, I need some clarification to help me understand them better. M - read.table(test1.csv,sep=,,row.names=NULL,header=T) gives me: M as M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 1 9 11 14 15 18 20 20 20 20 20 2

Re: [R] read.table or read.csv without row index?

2009-04-22 Thread Henrique Dallazuanna
Try this: unname(as.matrix(read.table('your_file.txt'))) On Wed, Apr 22, 2009 at 11:00 AM, tsunhin wong thjw...@gmail.com wrote: Hello all, Probably my concepts about the data.frame and matrix and array in R are not clear, I need some clarification to help me understand them better. M -

Re: [R] read.table or read.csv without row index?

2009-04-22 Thread Sarah Goslee
Really, this depends on what you are trying to do. What's the underlying problem you are solving? You can save a data frame to a file without the names, if that's the real question, but I can't think of any reason to not want names within R. A matrix does not have to have row and column names,

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Gabor Grothendieck
Try playing with the h= argument of breakpoints. Another possibility is to average each non-overlapping set of 10 points to reduce the problem size to 80 and run breakpoints on that. Might not be 1 sec but would likely be much faster. On Wed, Apr 22, 2009 at 9:45 AM, Hans-Henning Gabriel

Re: [R] Append to a csv file

2009-04-22 Thread Carlos Cuartas
Maybe each dataframe you are adding during the loop include the column name. I would add write.csv(mydata, file= “data.csv”=F, append=T,col.names=F) Hope that help Carlos To: r-help@r-project.org Sent: Monday, April 20, 2009 4:39:48 PM Subject: [R]

Re: [R] read.table or read.csv without row index?

2009-04-22 Thread jim holtman
You need to convert to a matrix and remove names: x - read.table(textConnection(M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 + 1 9 11 14 15 18 20 20 20 20 20 + 2 3 4 8 9 11 12 14 15 15 15 + 3 4 5 8 8 9 9 9 9 9 9 + 4 4 5 7 8 8 8 8 8 8 9), header=TRUE) closeAllConnections() y -

Re: [R] Discover significant change in sorted vector

2009-04-22 Thread Gabor Grothendieck
Or just take every 10th point. On Wed, Apr 22, 2009 at 10:15 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Try playing with the h= argument of breakpoints.  Another possibility is to average each non-overlapping set of 10 points to reduce the problem size to 80 and run breakpoints on

Re: [R] How to compare parameters of non linear fitting curves

2009-04-22 Thread Etienne Toffin
Spencer, Le 22-avr.-09 à 03:33, spencerg a écrit : Is your first model a special case of the second with eta1 = 0? If yes, what about using 2*log(likelihood ratio) being approximately chi-square? Yes, the first model is a special case of the second with eta1=0… Could you give me more

[R] Rép : How to compare parameters of non li near fitting curves - COMPLETE REPLY -

2009-04-22 Thread Etienne Toffin
Oups, I sent the email by error, as I was still writing my reply… Spencer, Le 22-avr.-09 à 03:33, spencerg a écrit : Is your first model a special case of the second with eta1 = 0? If yes, what about using 2*log(likelihood ratio) being approximately chi-square? Yes, the first

[R] Help using spg optimization in BB package

2009-04-22 Thread dre968
i'm trying to use the BB package to minimize the sum of the squared deviations for 2 vectors. The only thing am having trouble with is defining the project constraint. I got the upper and lower bounds to work but i am not sure how to create a constraint that the sum of x must be 1. Any help

Re: [R] RES: How to force axis to have the same range

2009-04-22 Thread Sebastien Bihorel
Thanks to all the people who answer my question. It is know clear to know how to produce a square shape graph... but I guess there is no easy way to force the x and the y axis to have the same limits. *Sebastien* Rodrigo Aluizio wrote: Hi Sebastien, take a look at the par(pty='s') argument.

[R] plot confidence intervals as shaded band

2009-04-22 Thread BARRES-DE-ALMEIDA U.
Hi, does anyone know how do I plot confidence intervals as a shaded band around a curve, rather than as errors bars? many thanks, ulisses. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Garchoxfit output

2009-04-22 Thread Vasileios Ismyrlis
To whom it may concern, I have a problem with the garchOxFit function I use. I run it and I want to know if the Hessian matrix is computed. I attach a file with the output. Best regards, Vasileios Ismyrlis __ R-help@r-project.org mailing list

[R] drawing a plot with SEM

2009-04-22 Thread ANJAN PURKAYASTHA
I have a data matrix: repeat1repeat2 13034 21223 3 50 13 4 5698 . . . I would like to plot for the mean and standard error of mean of repeat 1 and repeat2 for each row. Any pointers on how to do this in R?

[R] Problems with old version of R

2009-04-22 Thread anupam sinha
Hi all, Presently I have R-2.6 version installed on my system. Because of this I am unable to install certain packages.Will an updatepackages() command help or would I have to uninstall the older version of R and then install the newer versions ? Can anyone help me out ? Thanks in

Re: [R] Help using spg optimization in BB package

2009-04-22 Thread Ravi Varadhan
You can try defining a projection function as follows: project - function(x) x / sum(x) This should work fine. Let me know if you have any trouble. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor,

[R] How to make a time series object from a data frame containing dates.

2009-04-22 Thread Lane, Jim
Hi, All I have a data frame like this. names(x) [1] monthalloc_gb One of the columns contains the dates I want to use: data.class(x$month) [1] yearmon I would like to make a time series object out of this. However the ts function seems to require me to spell out the starting date. Is

Re: [R] drawing a plot with SEM

2009-04-22 Thread David Winsemius
Assume the object in question is a dataframe named dm: apply(dm, 1, mean) It worries me that you are asking for the sem's of two element objects, but if you really want it, the obvious modification to the above should work. On Apr 22, 2009, at 10:26 AM, ANJAN PURKAYASTHA wrote: I have

Re: [R] Problems with old version of R

2009-04-22 Thread Dimitri Liakhovitski
You don't have to uninstall the old version. Just install the new version. What I do then - I manually copy (in Windows Explorer) all the packages from the folder library that is under your old R version into the folder library under the new R version. And then I open the new R version and run

Re: [R] how to inspect content of save file

2009-04-22 Thread Dimitri Liakhovitski
Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names? On Wed, Apr 22, 2009 at 5:12 AM, Benno Pütz pu...@mpipsykl.mpg.de wrote: Am 21.Apr.2009 um 19:16 schrieb Dimitri Liakhovitski: Can't you just read in

Re: [R] plot confidence intervals as shaded band

2009-04-22 Thread Dieter Menne
BARRES-DE-ALMEIDA U. u.b.almeida at durham.ac.uk writes: does anyone know how do I plot confidence intervals as a shaded band around a curve, rather than as errors bars? http://had.co.nz/ggplot2/geom_smooth.html Dieter __ R-help@r-project.org

Re: [R] Help using spg optimization in BB package

2009-04-22 Thread Ravi Varadhan
Hi, Here is an example, with a correction to my previous email. fr - function(x) { ## Rosenbrock Banana function x1 - x[1] x2 - x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } require(BB) proj - function(x, lower, upper) x / sum(x) # note: you need to specify lower and upper as arguments,

Re: [R] drawing a plot with SEM

2009-04-22 Thread David Winsemius
I realized after looking again that you asked for plotting. Since you only have two points per row, it would be more honest statistically to plot the values rather than mean and sem. dm -read.table(textConnection( repeat1repeat2 + 13034 + 212

Re: [R] Returning Variables in R to Linux Shell

2009-04-22 Thread Whit Armstrong
try littler: warmstr...@linuxsvr2:/tmp$ export MYVALUE=`r -e 'cat(10)'` warmstr...@linuxsvr2:/tmp$ env|grep MYVALUE MYVALUE=10 warmstr...@linuxsvr2:/tmp$ On Wed, Apr 22, 2009 at 10:48 AM, Bierbryer, Andrew abierbr...@klsdiversified.com wrote: If I have an R script that I am executing from a

Re: [R] plot confidence intervals as shaded band

2009-04-22 Thread Bert Gunter
... or ?polygon in base graphics -- Bert Gunter -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dieter Menne Sent: Wednesday, April 22, 2009 8:23 AM To: r-h...@stat.math.ethz.ch Subject: Re: [R] plot confidence intervals as shaded

Re: [R] Returning Variables in R to Linux Shell

2009-04-22 Thread Barry Rowlingson
On Wed, Apr 22, 2009 at 3:48 PM, Bierbryer, Andrew abierbr...@klsdiversified.com wrote: For example, if I had a simple one line R script that just did            string - 'TEST', when I call /usr/local/bin/R -no-save MY_R_FILE, how can I put the value TEST into a shell variable?

Re: [R] RES: How to force axis to have the same range

2009-04-22 Thread Deepayan Sarkar
On 4/22/09, Sebastien Bihorel sebastien.biho...@cognigencorp.com wrote: Thanks to all the people who answer my question. It is know clear to know how to produce a square shape graph... but I guess there is no easy way to force the x and the y axis to have the same limits. If you mean the

[R] Exporting objects plotted with plot3d() - rgl package

2009-04-22 Thread Alejandro González
Dear all, Can anybody tell me how to export a 3d figure made with the plot3d function? I'm careless about whether it's still interactive or not in another format, as long I can get it out of R. Thanks! Alejandro González Departamento de Biodiversidad y Conservación Real Jardín Botánico

Re: [R] Exporting objects plotted with plot3d() - rgl package

2009-04-22 Thread David Winsemius
Pretty sure this question has been asked in the recent past and the answer was movie3d. -- David Winsemius On Apr 22, 2009, at 12:18 PM, Alejandro González wrote: Dear all, Can anybody tell me how to export a 3d figure made with the plot3d function? I'm careless about whether it's still

Re: [R] Exporting objects plotted with plot3d() - rgl package

2009-04-22 Thread Duncan Murdoch
On 4/22/2009 12:18 PM, Alejandro González wrote: Dear all, Can anybody tell me how to export a 3d figure made with the plot3d function? I'm careless about whether it's still interactive or not in another format, as long I can get it out of R. snapshot3d() gets a bitmap in .png format.

[R] Deleting rows that contain certain characters...or deleting ANOVA factors

2009-04-22 Thread Crosby, Jacy R
I'm hoping there's an easier way to do this... I have a large matrix which looks like this (data=REG, rownames are the Pat1, Pat2,...): L1 L2 L3 Phen1 Phen2 Phen3 Pat1AA TT A? 143 143 143 Pat2AT ?A AT 256 256 NA

Re: [R] Matrix package,solve() errors and crashes

2009-04-22 Thread Surendar Swaminathan
Hello Martin, Thanks for looking in to the problem. My mistake, I pasted the code for sparse matrix for the graph that was created by test.g - simplify(ba.game(1000,m=2)) What I was intending to show was I have a graph object g created by IGRPAH. Please find the link that has the graph object.

Re: [R] Help using spg optimization in BB package

2009-04-22 Thread Ravi Varadhan
Here is another approach using an augmented penalty lagragian method. The same example: fr - function(x) { ## Rosenbrock Banana function x1 - x[1] x2 - x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } fr.pen - function(x, k=1e05) { fr(x) + k * ( 1 - sum(x))^2 } require(BB) spg(par=c(0,

Re: [R] how to inspect content of save() file

2009-04-22 Thread Benno Pütz
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski: Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names? I could, but ... As save() writes a binary (and by default compressed) format that is

Re: [R] How to make a time series object from a data frame containing dates.

2009-04-22 Thread stephen sefick
look at the zoo package where there are quite a few functions to help with this. Stephen Sefick On Wed, Apr 22, 2009 at 11:09 AM, Lane, Jim jim.l...@rbc.com wrote: Hi, All I have a data frame like this. names(x) [1] month    alloc_gb One of the columns contains the dates I want to use:

Re: [R] how to inspect content of save() file

2009-04-22 Thread Duncan Murdoch
On 4/22/2009 12:59 PM, Benno Pütz wrote: Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski: Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names? I could, but ... As save() writes a binary (and

Re: [R] Deleting rows that contain certain characters...or deleting ANOVA factors

2009-04-22 Thread K. Elo
Hi, Crosby, Jacy R wrote: i.e. I'd like to have aov(Phen1~L1) use only Pat1-Pat4,and Pat 10. Similarly, aov(Phen1~L2) should use Pat1, 6, and 10. Etc. Is this something I can do in the aov function, or do I need to modify my dataset before running aov? In either case, I need

[R] Returning Variables in R to Linux Shell

2009-04-22 Thread Bierbryer, Andrew
If I have an R script that I am executing from a command line in linux, do you know how I can return the value of the variable in my R script to the linux environment without writing it to a file in my R script and then reading the file through cat? For example, if I had a simple one line R

Re: [R] How to make a time series object from a data frame containing dates.

2009-04-22 Thread Gabor Grothendieck
In particular, library(zoo) z - zoo(x$alloc_gb, x$month) plot(z) See the three zoo vignettes vignette(package = zoo) # to list them vignette(zoo) # to show first one and the help files library(help = zoo) ?zoo On Wed, Apr 22, 2009 at 1:07 PM, stephen sefick ssef...@gmail.com wrote: look at

[R] Problem with apply

2009-04-22 Thread Alan Cohen
Hi R users, I am trying to assign ages to age classes for a large data set (123,000 records), and using a for-loop was too slow, so I wrote a function and used apply. However, the function does not properly assign the first two classes (the rest are fine). It appears that when age is one

[R] R-User groups in North America (SF, LA, NYC, Ottawa)

2009-04-22 Thread Michael E. Driscoll
Hi R folks, I'd like to announce several new R users groups here in SF, LA, NYC, and Ottawa - as well as their next scheduled event. The goal of these user groups, besides gently explaining 'drop=TRUE' to the uninitiated, is to exchange knowledge, promote best practices, and spur the adoption of

Re: [R] Problem with apply

2009-04-22 Thread Erik Iverson
I'm not sure, but I think that using the cut function would solve your problem? ?cut On Wed, 22 Apr 2009 14:56:10 -0400, Alan Cohen coh...@smh.toronto.on.ca wrote: Hi R users, I am trying to assign ages to age classes for a large data set (123,000 records), and using a for-loop was too

Re: [R] Problem with apply

2009-04-22 Thread Jorge Ivan Velez
Hi Alan, You can avoid the if() else() you're using in your function by replacing it with the recode() function in the car package. I'm pretty sure it will speed up your function. See ?recode after loading the car package: require(car) ?recode HTH, Jorge On Wed, Apr 22, 2009 at 2:56 PM, Alan

Re: [R] Problem with apply

2009-04-22 Thread Marc Schwartz
The cut() function will do what you want in a vectorized fashion. See ? cut However, that being said, I would strongly advise that you read Frank's page on the categorizing of continuous variables: http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/CatContinuous before you proceed.

Re: [R] Problem with apply

2009-04-22 Thread Tobias Verbeke
Marc Schwartz wrote: The cut() function will do what you want in a vectorized fashion. See ?cut However, that being said, I would strongly advise that you read Frank's page on the categorizing of continuous variables: http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/CatContinuous

Re: [R] how to inspect content of save() file

2009-04-22 Thread MPI
Duncan Murdoch wrote: On 4/22/2009 12:59 PM, Benno Pütz wrote: Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski: Why do you use save()? Can't you write out data frame(s) with your variables in a .txt or a .csv file and then read in just the variable names? I could, but ... As

Re: [R] R-User groups in North America (SF, LA, NYC, Ottawa)

2009-04-22 Thread Seeliger . Curt
Correction: University of Oregon http://www.fsl.orst.edu/R_users - (unknown if currently active) Kenneth B. Pierce Jr. ken.pierce at oregonstate edu That's not University of Oregon, it's Oregon State University. U of O is in Eugene. They don't seem to be recently active in any

[R] Count Code

2009-04-22 Thread Bronagh Grimes
Hi there, I am interested in converting SAS code to R I wondered if anyone had any quick R code/tips for the following piece of test SAS code? Any feedback greatly appreciated. data A1; set A1; count + 1; by subject_id; if first.subject_id then count = 1; run;

Re: [R] how to inspect content of save() file

2009-04-22 Thread Duncan Temple Lang
Hi Benno et al. I have had some code for reading RDA files via R functions and binary connections. It is available from http://www.omegahat.org/RDA or install.packages(RDA, repos = http://www.omegahat.org/R;, dep = TRUE) It could be made faster if there is

[R] plot.logistic.fit.fnc

2009-04-22 Thread Sarah Foster
Hello, I can not get the function plot.logistic.fit.fnc() workingit returns Error: could not find function plot.logistic.fit.fnc. Do I need to upload as specific package first? I am trying to check the fit of a mixed logistic model. Also, any advice for checking the assumption of

[R] large factorials

2009-04-22 Thread molinar
I am working on a project that requires me to do very large factorial evaluations. On R the built in factorial function and the one I created both are not able to do factorials over 170. The first gives an error and mine return Inf. Is there a way to have R do these larger calculations (the

[R] generate multipe output .csv files in a loop

2009-04-22 Thread Gator Connection
I need to generate output files as .csv file in a loop: let's say, I want to generate a sequence of files according to the loop number i. the first file genearted should be file1.csv the second should be file2.csv I use: write.csv(temp, file$i$.csv) in the loop but it did not work. can

[R] [R-pkgs] Sequence analysis with TraMineR 1.2

2009-04-22 Thread Alexis Gabadinho
Dear R users, The TraMineR package for mining, describing and visualizing sequences of states or events, and more generally discrete sequential data has been updated to version 1.2. Its primary aim is the analysis of biographical longitudinal data in the social sciences, such as data

Re: [R] bladder1 dataset in survival library

2009-04-22 Thread Petra Buzkova
Petra, try either running update.packages() or installing R 2.9.0. Thanks Mark, I got it now. Thanks, Petra Petra Buzkova, PhD Department of Biostatistics University of Washington 206-897-1962 (phone) 206-616-4075 (fax) Marc Schwartz wrote: On Apr

[R] How do I loop through strings?

2009-04-22 Thread dre968
I read in a CSV file with Data - read.csv(file=FileName.csv,head=TRUE,sep=,) the file containts strings in the 2nd and 3rd columns and each has about 1000 rows. I need to either loop through the strings there looking for strings that would trigger other logic or remove those rows and put them

[R] function output with for loop and if statement

2009-04-22 Thread aaron wells
Hello all, turns out i'm having a bad R week. I am at my wits end with a function that I am trying to write. When I run the lines of code outside of a function, I get the desired output. When I wrap the lines of code into a function it doesn't work as expected. Not sure what is going on

Re: [R] generate multipe output .csv files in a loop

2009-04-22 Thread Gabriel R. Rodriguez
What you can do is to name the file outside the write.csv statement file - as.character(paste(file, i, .csv, sep=)) write.csv(tempo, file) Gabriel Ing. Agr. Gabriel R. Rodriguez Inst. de Clima y Agua - CNIA INTA Castelar Las Cabañas y Los Reseros SN (1686) Hurlingham - Argentina Tel 54

Re: [R] Count Code

2009-04-22 Thread David Winsemius
On Apr 22, 2009, at 3:42 PM, Bronagh Grimes wrote: Hi there, I am interested in converting SAS code to R I wondered if anyone had any quick R code/tips for the following piece of test SAS code? Any feedback greatly appreciated. data A1; set A1; count + 1; by subject_id; if

  1   2   >