[R] do not execute newline command

2011-04-05 Thread Lorenzo Cattarino
Hi R-users, To automate the creation of scripts, I converted the code (example below) into a character string and wrote the object to a file: Repeat - myvec - c(1:12) cat('vector= ', myvec, '\n') write (Repeat, 'yourpath/test.R') the problem is that one line of the code is a cat command. In

[R] kmeans clustering java

2011-04-05 Thread jcg3441
Hello, I have been trying for a few days to do kmeans on a matrix of data which I populate from java. Here's my code: String[] Rargs = {--vanilla}; Rengine re = new Rengine(Rargs, false, null); System.out.println(Rengine created, waiting for R); // the

Re: [R] several Filled.contour plots on the same device...

2011-04-05 Thread sunaj
Billy.Requena, I bow myself into the dust - exactly what I was looking for. Thx, Sunaj -- View this message in context: http://r.789695.n4.nabble.com/several-Filled-contour-plots-on-the-same-device-tp819040p3427236.html Sent from the R help mailing list archive at Nabble.com.

[R] Euclidean Distance in R

2011-04-05 Thread Paul Duckett
Hi 1. I have two raster files *.asc (identical size) 2. The data in each contain presence or absence data in each cell represented by a 1 or 0 respectively 3. I would like to take the location of each 1 (presence cell) in raster file 1 and measure the euclidean distance to the nearest 1 (presence

Re: [R] ANCOVA for linear regressions without intercept

2011-04-05 Thread Yusuke Fukuda
Hi Steve It worked with my data! I didn't think of combining the categories before doing ANOVA to test for the difference. This is the final answer to my question. Thank you very much for your time. Regards, Yusuke -Original Message- From: Steven McKinney [mailto:smckin...@bccrc.ca]

Re: [R] ANCOVA for linear regressions without intercept

2011-04-05 Thread Yusuke Fukuda
Hi Steve Wow, this could be the way to get around to what I was after. I will have a close look and see if it works with my data. Will let you know how it goes. Thank you. Yusuke -Original Message- From: Steven McKinney [mailto:smckin...@bccrc.ca] Sent: Tuesday, 5 April 2011 12:08

[R] Saving console and graph output to same file

2011-04-05 Thread Nikhil Abhyankar
Hello All, How do I save the output of the R console and the graphic output to the same PDF file and append these to each other? I need to have a frequency table and a corresponding graph, one below the other in a file. I have tried with sending the cross table to the graph window using

Re: [R] Granger Causality in a VAR Model

2011-04-05 Thread Pfaff, Bernhard Dr.
The below email was cross-posted to R-Sig-Finance and has been answered there. -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von ivan Gesendet: Montag, 4. April 2011 20:24 An: r-help@r-project.org Betreff: [R] Granger

Re: [R] Creating multiple vector/list names-novice

2011-04-05 Thread michalseneca
The exact would be for example that I shoul be able then to choose a from abc. and I cannot do that. -- View this message in context: http://r.789695.n4.nabble.com/Creating-multiple-vector-list-names-novice-tp3425616p3427283.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] system() command in R

2011-04-05 Thread nandan amar
On 4 April 2011 16:54, rasanpreet kaur suri rasanpreet.k...@gmail.comwrote: Hi all, I have a local server insalled on my system and have to start that from within my R function. here is how I start it: cmd-sh start-server.sh system(cmd, wait=FALSE) My function has to start the server

Re: [R] do not execute newline command

2011-04-05 Thread Kenn Konstabel
On Tue, Apr 5, 2011 at 10:40 AM, Lorenzo Cattarino l.cattar...@uq.edu.au wrote: Hi R-users, To automate the creation of scripts, I converted the code (example below) into a character string and wrote the object to a file: Repeat - myvec - c(1:12) cat('vector= ', myvec, '\n') write

Re: [R] Euclidean Distance in R

2011-04-05 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/04/11 03:43, Paul Duckett wrote: Hi Hi 1. I have two raster files *.asc (identical size) This question is much more appropriate for the r-sig-geo mailing list (https://stat.ethz.ch/mailman/listinfo/r-sig-geo), which focusses on spatial

Re: [R] Euclidean Distance in R

2011-04-05 Thread ONKELINX, Thierry
Dear Paul, The command RSiteSearch(nearest neighbour) Will give you the answer that you need. (The second hit is the function you want). Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en

Re: [R] Saving console and graph output to same file

2011-04-05 Thread Philipp Pagel
On Tue, Apr 05, 2011 at 10:53:03AM +0530, Nikhil Abhyankar wrote: Hello All, How do I save the output of the R console and the graphic output to the same PDF file and append these to each other? I need to have a frequency table and a corresponding graph, one below the other in a file. I

Re: [R] General binary search?

2011-04-05 Thread Matthew Dowle
Try data.table:::sortedmatch, which is implemented in C. It requires it's input to be sorted (and doesn't check) Stavros Macrakis macra...@alum.mit.edu wrote in message news:BANLkTi=j2lf5syxytv1dd4k9wr0zgk8...@mail.gmail.com... Is there a generic binary search routine in a standard library

Re: [R] RODBC excel - need to preserve (or extract) numeric column names

2011-04-05 Thread Enrico Schumann
At least for Excel 2003 on my computer (Win XP) I can persuade Excel to treat cells like text by prepending a ' to the entry (eg, '1000). Then sqlFetch/RODBC should import these cells as character. [But a number would not be valid column name for a data.frame, and you may run into other trouble.

Re: [R] grImport/ghostscript problems

2011-04-05 Thread guillaume Le Ray
Hi Al, I'm facing exactly the same problem as you are, have you manage to fix it? If yes I eager to know the trick. Regards, Guillaume 2011/3/27 Al Roark hrbuil...@hotmail.com Paul Murrell p.murrell at auckland.ac.nz writes: Hi On 28/03/2011 8:13 a.m., Al Roark wrote: Hi All:

Re: [R] Creating multiple vector/list names-novice

2011-04-05 Thread Uwe Ligges
On 05.04.2011 09:07, michalseneca wrote: The exact would be for example that I shoul be able then to choose a from abc. and I cannot do that. The is rather unhelpful for helpers without quoting what your original question and the answers were. Uwe Ligges -- View this message in context:

Re: [R] Problem using svm.tune

2011-04-05 Thread Uwe Ligges
On 04.04.2011 12:43, sadaf zaidi wrote: Dear Sir, I am stuck with a nagging problem in using R for SVM regression. My data has 5 dimensions and 400 observations. The independent variables are : Peb, Ksub, Sub, and Xtt. The dependent variable is: Rexp. I tried using the svm.tune function as

[R] Animation for pers3d

2011-04-05 Thread Grigory Alexandrovich
Hello all, I use persp3d from the rgl-package to plot a sruface. The typical call is persp3d(x, y, z) With cooridinate-vectros x, y and a function-values matrix z. Now I have different z's, say z_1,...,z_n Question: Is it possible to generate an animation from a sequence of such calls, for

Re: [R] converting call objects into character

2011-04-05 Thread Samuel Le
://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 6016 (20110405) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] system() command in R

2011-04-05 Thread rasanpreet kaur suri
Hi, The further steps do not get executed because the server keeps waiting. and they are in the same function as the start server. if server started manually then they run normally from the R environment. Is that what you wanted to know? I hope I answered it . On Tue, Apr 5, 2011 at

Re: [R] Adjusting p values of a matrix

2011-04-05 Thread January Weiner
1. This is not an R question, AFAICS. I am afraid I was not clear enough. I am wondering how to best correct p values that are stored in a matrix, or, in more general: how to apply a function that takes a vector as an argument to the upper right (or, equivalently, lower left) half of a matrix,

[R] frailty

2011-04-05 Thread hsr
Hi R-users I spend a lot of time searching on the web but I didn’t found a clear answer. I have some doubts with 'frailty' function of 'survival' package. The following model with the function R ‘coxph’ was fitted: modx - coxph(Surv(to_stroke, stroke) ~ age + sbp + dbp + sex +

Re: [R] Adjusting p values of a matrix

2011-04-05 Thread January Weiner
       as.matrix(p.adjust(as.dist(pmat))) Perfect! Thanks. j. Benno On 4.Apr.2011, at 17:02, January Weiner wrote: Dear all, I have an n x n matrix of p-values. The matrix is symmetrical, as it describes the each against each p values of correlation coefficients. How can I best

[R] Help in splitting a list

2011-04-05 Thread Lars Bishop
Dear R users, Let's say I have a list with components being 'm' matrices (as exemplified in the mylist object below). Now, I'd like to subset this list based on an index vector, which will partition each matrix 'm' in 2 sub-matrices. My questions are: 1. Is there an elegant way to have the

Re: [R] gap.barplot doesn't support data arrays?

2011-04-05 Thread Jim Lemon
On 04/04/2011 11:39 PM, Andrew D. Steen wrote: I am trying to make a barplot with a broken axis using gap.barplot (in the indispensable plotrix package). Aww, gee, you've won me. This works well when the data is a vector: twogrp-c(rnorm(10)+4,rnorm(10)+20)

Re: [R] converting call objects into character

2011-04-05 Thread Gabor Grothendieck
On Sun, Apr 3, 2011 at 12:14 PM, Samuel Le samuel...@srlglobal.com wrote: Dear all, I would like to log the calls to my functions. I am trying to do this using the function match.call(): fTest-function(x) {      theCall-match.call()      print(theCall)      return(x) }

Re: [R] Error in color2D.matplot : Error in plot.new() : figure margins too large

2011-04-05 Thread Jim Lemon
Hi all, Just to let you know that the error was in the calculation (and the error message maybe peculiar to the original poster's system), not color2D.matplot. The message sent to the original poster was long and not very meaningful to those who didn't get the data and code (i.e. everybody

Re: [R] Animation for pers3d

2011-04-05 Thread Duncan Murdoch
On 11-04-05 5:43 AM, Grigory Alexandrovich wrote: Hello all, I use persp3d from the rgl-package to plot a sruface. The typical call is persp3d(x, y, z) With cooridinate-vectros x, y and a function-values matrix z. Now I have different z's, say z_1,...,z_n Question: Is it possible to generate

Re: [R] gap.barplot doesn't support data arrays?

2011-04-05 Thread Andrew D. Steen
Jim, That works great. Thanks much for the quick help. Cheers, Drew -Original Message- From: Jim Lemon [mailto:j...@bitwrit.com.au] Sent: Tuesday, April 05, 2011 2:12 PM To: Andrew D. Steen Cc: r-help@r-project.org Subject: Re: [R] gap.barplot doesn't support data arrays? On

Re: [R] Help in splitting a list

2011-04-05 Thread Henrique Dallazuanna
Try this: mapply('[', lapply(mylist, as.data.frame), c(index, lapply(index, `!`)), SIMPLIFY = FALSE) On Tue, Apr 5, 2011 at 7:46 AM, Lars Bishop lars...@gmail.com wrote: Dear R users, Let's say I have a list with components being 'm' matrices (as exemplified in the mylist object below).

Re: [R] lattice: how to center a subtitle?

2011-04-05 Thread Deepayan Sarkar
On Tue, Apr 5, 2011 at 6:12 AM, David Scott d.sc...@auckland.ac.nz wrote: [...] I am not sure where I read it and I can't find it again, but my understanding is that expressions using bquote with lattice need to be enclosed in as.expression() to work. That is in contrast to what happens in

Re: [R] system() command in R

2011-04-05 Thread Mike Marchywka
Date: Tue, 5 Apr 2011 13:37:12 +0530 From: nandan.a...@gmail.com To: rasanpreet.k...@gmail.com CC: r-help@r-project.org Subject: Re: [R] system() command in R On 4 April 2011 16:54, rasanpreet kaur suri wrote: Hi all, I have a local

[R] how to label customized y axis when using lattice parallel parameter common.scale=TRUE

2011-04-05 Thread Pengcheng Yang
Dear all, When I use parallel function in lattice package, I want to label the y-axis with customized numbers. Like this: parallel(~iris[1:4] | Species, iris,horiz=FALSE,common.scale=TRUE, scales=list(y=list(at=c(0,2,3 But only Min label in the y-axis, nothing happened. Could anyone

[R] Value between which elements of a vector?

2011-04-05 Thread beatleb
Dear R-useRs, I am looking for a why to perform the following: specialweeks-c(0,2,5,12,18,19,20) weeks-c(1:30) Now I would like that for every week it is even between which elements of vector special weeks it is. For weeks after 20, the value NA or 20, or even 20-30is fine. Thus for week 1:

[R] Time series example in Koop

2011-04-05 Thread Ravi Kulkarni
I am trying to reproduce the output of a time series example in Koop's book Analysis of Financial Data. Koop does the example in Excel and I used the ts function followed by the lm function. I am unable to get the exact coefficients that Koop gives - my coefficients are slightly different. After

[R] Confidence interval for the difference between proportions - method used in prop.test()

2011-04-05 Thread Stefanie Von Felten
Hello, Does anyone know which method from Newcombe (1998)* is implemented in prop.test for comparing two proportions? I would guess it is the method based on the Wilson score (for single proportion), with and without continuity correction for prop.test(..., correct=FALSE) and prop.test(...,

Re: [R] lattice xscale.components: different ticks on top/bottom axis

2011-04-05 Thread Deepayan Sarkar
On Sat, Apr 2, 2011 at 1:29 AM, boris.vasil...@forces.gc.ca wrote: On Fri, Mar 11, 2011 at 12:28 AM, boris.vasil...@forces.gc.ca wrote: Good afternoon, I am trying to create a plot where the bottom and top axes have the same scale but different tick marks.  I tried user-defined

Re: [R] Value between which elements of a vector?

2011-04-05 Thread andrija djurovic
Hi: try this and have a look at ?cut just to change the lables: data.frame( weeks=sprintf('%s %d','week',1:30), specialweeks=cut(1:30,c(0,2,5,12,18,19,20),right = FALSE)) Andrija On Tue, Apr 5, 2011 at 1:20 PM, beatleb rhelpfo...@gmail.com wrote: Dear R-useRs, I am looking for a why to

Re: [R] how to label customized y axis when using lattice parallel parameter common.scale=TRUE

2011-04-05 Thread Deepayan Sarkar
On Tue, Apr 5, 2011 at 4:39 PM, Pengcheng Yang peng...@gmail.com wrote: Dear all, When I use parallel function in lattice package, I want to label the y-axis with customized numbers. Like this: parallel(~iris[1:4] | Species, iris,horiz=FALSE,common.scale=TRUE,    

Re: [R] Time series example in Koop

2011-04-05 Thread Gabor Grothendieck
On Tue, Apr 5, 2011 at 8:35 AM, Ravi Kulkarni ravi.k...@gmail.com wrote: I am trying to reproduce the output of a time series example in Koop's book Analysis of Financial Data. Koop does the example in Excel and I used the ts function followed by the lm function. I am unable to get the exact

Re: [R] Confidence interval for the difference between proportions - method used in prop.test()

2011-04-05 Thread Joshua Wiley
Hi Stefanie, Just to be clear, we are talking about differences in the third or lower decimal place (at least with R version 2.13.0 alpha (2011-03-17 r54849), Epi_1.1.20). This strikes me as small enough that both functions may be implementing the same method, but maybe slightly different ways

Re: [R] RODBC excel - need to preserve (or extract) numeric column names

2011-04-05 Thread David Winsemius
On Apr 5, 2011, at 4:53 AM, Enrico Schumann wrote: At least for Excel 2003 on my computer (Win XP) I can persuade Excel to treat cells like text by prepending a ' to the entry (eg, '1000). Then sqlFetch/RODBC should import these cells as character. [But a number would not be valid column

Re: [R] system() command in R

2011-04-05 Thread Jeff Newmiller
The ampersand is a good idea, but nohup is best avoided in scripts. Rather the server itself should handle the transition to daemon status to avoid ending up with many duplicate server processes running. --- Jeff Newmiller

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-04-05 Thread yrosseel
On 04/04/2011 07:14 PM, jouba wrote: Thanks you for your response For lavaan package can i have more information about this example you have applied in the section 7 the meanings of The variables (c1,c2,c3,c4, i ,s ,x1,x2) I think i have need more information to learn more about how able

Re: [R] Confidence interval for the difference between proportions - method used in prop.test()

2011-04-05 Thread Joshua Wiley
Dear Steffi, On Tue, Apr 5, 2011 at 7:26 AM, Stefanie Von Felten svonfel...@uhbs.ch wrote: Dear Josh, Thanks for your help! Does your answer mean, that you agree the two methods should do the same, and what I was guessing, despite the small differences? That would be my guess, but I have

Re: [R] Time series example in Koop

2011-04-05 Thread Mike Marchywka
Date: Tue, 5 Apr 2011 07:35:04 -0500 From: ravi.k...@gmail.com To: r-help@r-project.org Subject: [R] Time series example in Koop I am trying to reproduce the output of a time series example in Koop's book Analysis of Financial Data. Koop does the example in Excel and I used the ts

[R] Help to check data before putting it in a database

2011-04-05 Thread Ulisses.Camargo
The example scene: I have a database with stats about each goal made by my soccer team. This database (a data frame in R) is organized in lines (goals) with a set of columns containing data about these goals (player name, tactic position, etc). For now, this database will be called data.frame1.

Re: [R] Support Counting

2011-04-05 Thread psombe
well im using the arules package and i'm trying to use the support command. my data is read form a file using the read.transactions command and a line of data looks something like this. there are aboutt 88000 rows and 16000 different items inspect(dset[3]) items 1 {33, 34, 35}

Re: [R] how to label customized y axis when using lattice parallel parameter common.scale=TRUE

2011-04-05 Thread Pengcheng Yang
Thanks Deepayan, It works! On 2011-4-5 21:42, Deepayan Sarkar wrote: On Tue, Apr 5, 2011 at 4:39 PM, Pengcheng Yangpeng...@gmail.com wrote: Dear all, When I use parallel function in lattice package, I want to label the y-axis with customized numbers. Like this: parallel(~iris[1:4] |

[R] Antw: Re: Confidence interval for the difference between proportions - method used in prop.test()

2011-04-05 Thread Stefanie Von Felten
Dear Josh, Thanks for your help! Does your answer mean, that you agree the two methods should do the same, and what I was guessing, despite the small differences? What I prefer about ci.pd is, that the help clearly says which method is implemented, which is not the case for prop.test. But I

Re: [R] Help to check data before putting it in a database

2011-04-05 Thread Joshua Wiley
Hi Ulisses, Look at the functions ?match and ?rbind If you do not want to do it by hand, you can make a little function as below. HTH, Josh d1 - data.frame(goals = 4:1, players = LETTERS[1:4]) d2 - data.frame(goals = c(1, 3, 2, 5), players = LETTERS[3:6]) f - function(old, new, check) {

Re: [R] Help to check data before putting it in a database

2011-04-05 Thread Jeff Newmiller
I would recommend using R to check your input and identify bad input and to only load data that passes validation. Then go back to some other tool for editing the data and save/reload/reverify the edited data. The merge command with the all.x argument and is.na() can be used, or the ! and %in%

Re: [R] Help to check data before putting it in a database

2011-04-05 Thread Ulisses.Camargo
Hello Josh, It works. Thanks a lot!! I have now the basic tools to advance! Best! Ulisses 2011/4/5 Joshua Wiley-2 [via R] ml-node+3428356-844576439-227...@n4.nabble.com: Hi Ulisses, Look at the functions ?match and ?rbind If you do not want to do it by hand, you can make a little function as

Re: [R] how to label customized y axis when using lattice parallel parameter common.scale=TRUE

2011-04-05 Thread Pengcheng Yang
I have readjust the script as follows to retain the complete information of original graph, the background vertical bar. parallel(~iris[1:4] | Species, iris,horizon=FALSE, ylim = extendrange(range(iris[1:4])), scales = list(y = list(at = NULL, labels = NULL),x=list(rot=45)),

[R] loop question

2011-04-05 Thread Thomas
Dear all, I am trying to set up a list with 1:c objects each meant to capture the coefficients for one coefficient and 100 replications. I receive the following error message: Error in betaboot[[p]] : subscript out of bounds. My code is below. Where is my mistake? Many thanks, Thomas

Re: [R] loop question

2011-04-05 Thread Joshua Wiley
Dear Thomas, On Tue, Apr 5, 2011 at 8:33 AM, Thomas thomas.tri...@cantab.net wrote: Dear all, I am trying to set up a list with 1:c objects each meant to capture the coefficients for one coefficient and 100 replications. I receive the following error message: Error in betaboot[[p]] :

[R] Gibbs sampling

2011-04-05 Thread Liliana Pacheco
HI R users, perhaps you can help me with this: I am planning on using the Gibbs sampler for the correlation coefficient of a bivariate normal. I have a posterior distribution for rho, besides that, the conditional distribution for all the parameters of this posterior distribution. The thing is

[R] Precision of summary() when summarizing variables in a data frame

2011-04-05 Thread Daniel Malter
Hi, I summary() a variable with 409908 numeric observations. The variable is part of a data.frame. The problem is that the min and max returned by summary() do not equal the ones returned by min() and max(). Does anybody know why that is? min(data$vc) [1] 15452 max(data$vc) [1] 316148

[R] lorena

2011-04-05 Thread lorena delgadillo
Dear I would like to know how to use the Croston method in R, consaltarte if I download a package? personally work the series as a SARIMA In the present instalment have many values zeros proposed the following model, but I have many doubts with his predictions. M3 = arima (d1, order = c

Re: [R] Precision of summary() when summarizing variables in a data frame

2011-04-05 Thread jim holtman
They are probably the same. It isjust that summary is printing out 4 significant digits. Try: options(digits = 20) On Tue, Apr 5, 2011 at 12:38 PM, Daniel Malter dan...@umd.edu wrote: Hi, I summary() a variable with 409908 numeric observations. The variable is part of a data.frame. The

Re: [R] Creating multiple vector/list names-novice

2011-04-05 Thread michalseneca
Thanks I already found out solution :) -- View this message in context: http://r.789695.n4.nabble.com/Creating-multiple-vector-list-names-novice-tp3425616p3428617.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Arrangement of Lattice Histograms - Top to bottom and then left to right?

2011-04-05 Thread Les
Hi List, Using Lattice, I have created a plot of histograms showing Fork Length by Year. The plot shows the histograms in 3 columns and 5 rows. Using the as.table=T function I can get the years to start on top. However, what I would like to do is have the first year start in the top left (column

Re: [R] Precision of summary() when summarizing variables in a data frame

2011-04-05 Thread Erik Iverson
jim holtman wrote: They are probably the same. It isjust that summary is printing out 4 significant digits. Try: options(digits = 20) FYI, the default summary method also has its own digits argument. On Tue, Apr 5, 2011 at 12:38 PM, Daniel Malter dan...@umd.edu wrote: Hi, I

Re: [R] Arrangement of Lattice Histograms - Top to bottom and then left to right?

2011-04-05 Thread Bert Gunter
Look for the index.cond argument at the bottom of the Help page for xyplot. -- Bert On Tue, Apr 5, 2011 at 11:37 AM, Les lnhar...@zoology.ubc.ca wrote: Hi List, Using Lattice, I have created a plot of histograms showing Fork Length by Year. The plot shows the histograms in 3 columns and 5

Re: [R] Changing parameter in local fdr R code

2011-04-05 Thread Jim Silverton
I am using Efron's local fdr procedure. But, I want to change the null from N(0,1) to N(0, 0.002). I can access the function but I have no idea what to change. In other words, I want nulltype to be N(0,0.002) instead of N(0,1) in his function. Anyone has any ideas. This is his code for the local

Re: [R] detect filetype (as in unix 'file')

2011-04-05 Thread Jeroen Ooms
No, but what is wrong with using system()? The application is running in a very sandboxed environment and might not have permission to execute 'file'. 'file' is large and complex because it tries to be comprehensive (but it still does not know about some common systems, e.g. 64-bit Windows

Re: [R] Precision of summary() when summarizing variables in a data frame

2011-04-05 Thread Daniel Malter
Thanks all. No I wasn't aware of the fact that summary is rounding in this case. Da. -- View this message in context: http://r.789695.n4.nabble.com/Precision-of-summary-when-summarizing-variables-in-a-data-frame-tp3428570p3429022.html Sent from the R help mailing list archive at Nabble.com.

[R] Hazard ratio calculation and KM plot p-value:

2011-04-05 Thread Angel Russo
I have two questions: 1) Can anyone provide me with a reference regarding calculation of Hazard ratio for two groups of data. How is it being manually calculated with an example. Unlike median time ratio which is the ratio of median times in two groups, at what time is the hazard ratio

Re: [R] Arrangement of Lattice Histograms - Top to bottom and then left to right?

2011-04-05 Thread Les
Thank you. The help is much appreciated. Les -- View this message in context: http://r.789695.n4.nabble.com/Arrangement-of-Lattice-Histograms-Top-to-bottom-and-then-left-to-right-tp3428825p3429123.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Structural equation modeling in R(lavaan,sem)

2011-04-05 Thread jouba
Thanks a lot Antra EL MOUSSELLY Date: Tue, 5 Apr 2011 09:49:08 -0500 From: ml-node+3428265-1156197921-225...@n4.nabble.com To: antr...@hotmail.com Subject: Re: Structural equation modeling in R(lavaan,sem) On 04/04/2011 07:14 PM, jouba wrote: Thanks you for your response For

[R] IFELSE function XXXX

2011-04-05 Thread Dan Abner
Hello everyone, This IFELSE function call is not working properly. I do not receive an error message, but the actions are not executed conditional as I was hoping. Any assistance is appreciated. set.seed(12345) res1-rbinom(1,1,.1) rdata3-transform(data.frame(res1),input1=rnorm(1,50,10))

[R] simple save question

2011-04-05 Thread xueke
Hi, When I run the survfit function, I want to get the restricted mean value and the standard error also. I found out using the print function to do so, as shown below, print(km.fit,print.rmean=TRUE) Call: survfit(formula = Surv(diff, status) ~ 1, type = kaplan-meier) records

Re: [R] IFELSE function XXXX

2011-04-05 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dan Abner Sent: Tuesday, April 05, 2011 12:58 PM To: r-help@r-project.org Subject: [R] IFELSE function Hello everyone, This IFELSE function call is not working

Re: [R] grImport/ghostscript problems

2011-04-05 Thread Paul Murrell
Hi On 5/04/2011 9:30 p.m., guillaume Le Ray wrote: Hi Al, I'm facing exactly the same problem as you are, have you manage to fix it? If yes I eager to know the trick. Al's problem turned out to be a bug in 'grImport', so one thing you can try is to install the latest version of 'grImport'.

Re: [R] lattice: how to center a subtitle?

2011-04-05 Thread David Scott
On 6/04/2011 12:47 a.m., Deepayan Sarkar wrote: On Tue, Apr 5, 2011 at 6:12 AM, David Scottd.sc...@auckland.ac.nz wrote: [...] I am not sure where I read it and I can't find it again, but my understanding is that expressions using bquote with lattice need to be enclosed in as.expression() to

[R] solveRsocp in fPortfolio

2011-04-05 Thread Luis Felipe Parra
Hello I am trying to use solveRsocp to optimize a Portfolio maximizing return. I was checking the code since I would like to solve it for a short Portfolio and I found this: # C - Cone Constraints: C1 - rep(0, nAssets) # xCx C2 - eqsumW[2, -1]

[R] Search arrays based on similar values

2011-04-05 Thread mjdubya
Hey folks, I have two arrays: A (1X100) with non-ordered values ranging 1-14 B (2X14) containing 14 decimal values. I would like to create a new array (1X100) that contains only the decimal values from array B by associating the integers from A and B. In other

Re: [R] IFELSE function XXXX

2011-04-05 Thread Ben Bolker
William Dunlap wdunlap at tibco.com writes: Avoid assignments in arguments to function calls, especially multiple assignments to the same object, except when you know what you are doing and want to write obscure code. Change the above line to data3$input1 - ifelse(data3$res1==1,

Re: [R] Search arrays based on similar values

2011-04-05 Thread David Winsemius
On Apr 5, 2011, at 6:34 PM, mjdubya wrote: Hey folks, I have two arrays: A (1X100) with non-ordered values ranging 1-14 B (2X14) containing 14 decimal values. I would like to create a new array (1X100) that contains only the decimal values from array B by

Re: [R] R gui on windows how to force to always show the last line of output

2011-04-05 Thread stan zimine
thank you, David, for your answer, which has a therapeutic effect. Otherwise i was launching my prod code from Emacs ESS jas as Janice suggested. On Sat, Apr 2, 2011 at 2:27 PM, David Winsemius dwinsem...@comcast.net wrote: On Apr 2, 2011, at 4:21 AM, stan zimine wrote: Hi. Googled but

Re: [R] merging 2 frames while keeping all the entries from the reference frame

2011-04-05 Thread Dimitri Liakhovitski
Thanks a lot - these solutions are much more elegant than my own: new.data-merge(mydata[mydata$group %in% levels(mydata$group)[1],],reference,by=mydate,all.x=T,all.y=T) new.data[[group]][is.na(new.data[[group]])]-levels(mydata$group)[1] new.data[[values]][is.na(new.data[[values]])]-0 # Continue

[R] A fortunes candidate?

2011-04-05 Thread Bert Gunter
A fortunes candidate? On Tue, Apr 5, 2011 at 3:59 PM, David Winsemius dwinsem...@comcast.net wrote: ... snipped Tested solutions offered when reproducible examples are provided. -- Men by nature long to get on to the ultimate truths, and will often be impatient with elementary studies

[R] Error in match.names(clabs, names(xi))

2011-04-05 Thread Quan Zhou
Hi Guys, I have this part of a program: library(survival) Gastric - cbind.data.frame(Gp=c(rep(1,45),rep(0,45)), ### 2nd gp 0 time=c(1,63,105,129,182,216,250,262,301,301,342,354,356,358, 380,383, 383,388,394,408,460,489,499,523,524,535,562,569,675,676,

Re: [R] A fortunes candidate?

2011-04-05 Thread John Kane
Sounds more like an advertisement A bit like the old TV story Paladin, have gun, will travel. --- On Tue, 4/5/11, Bert Gunter gunter.ber...@gene.com wrote: From: Bert Gunter gunter.ber...@gene.com Subject: [R] A fortunes candidate? To: David Winsemius dwinsem...@comcast.net A fortunes

Re: [R] Error in match.names(clabs, names(xi))

2011-04-05 Thread David Winsemius
On Apr 5, 2011, at 8:28 PM, Quan Zhou wrote: Hi Guys, I have this part of a program: library(survival) Gastric - cbind.data.frame(Gp=c(rep(1,45),rep(0,45)), ### 2nd gp 0 time=c(1,63,105,129,182,216,250,262,301,301,342,354,356,358, 380,383,

[R] Pulling strings from a Flat file

2011-04-05 Thread Kalicin, Sarah
Hi, I have a flat file that contains a bunch of strings that look like this. The file was originally in Unix and brought over into Windows: E123456E234567E345678E456789E567891E678910E. . . . Basically the string starts with E and is followed with 6 numbers. One string=E123456, length=7

Re: [R] Pulling strings from a Flat file

2011-04-05 Thread David Winsemius
On Apr 5, 2011, at 7:48 PM, Kalicin, Sarah wrote: Hi, I have a flat file that contains a bunch of strings that look like this. The file was originally in Unix and brought over into Windows: E123456E234567E345678E456789E567891E678910E. . . . Basically the string starts with E and is

Re: [R] Arrangement of Lattice Histograms - Top to bottom and then left to right?

2011-04-05 Thread Deepayan Sarkar
On Wed, Apr 6, 2011 at 12:34 AM, Bert Gunter gunter.ber...@gene.com wrote: Look for the index.cond argument at the bottom of the Help page for xyplot. -- Bert Also ?print.trellis and ?packet.panel.default for a more general (non-example-specific) approach. -Deepayan On Tue, Apr 5, 2011 at