Re: [R] Search arrays based on similar values

2011-04-05 Thread Petr Savicky
On Tue, Apr 05, 2011 at 05:34:50PM -0500, 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

[R] executing from .R source file in the src package

2011-04-05 Thread Larry
Can I run R code straight from R src (.R) file instead of .rdb/.rdx? I of course tried simply unzipping tar.gz in the R_LIBS directory but R complains with "not a valid installed package". Real issue: I am very new to R and all, so this could be something basic. I'm trying to use ess-tracebug (E

[R] Package diveMove readTDR problem

2011-04-05 Thread mwege
Hi, I am trying to read my TDR data into R using the readTDR function for the diveMove package. > seal <- readTDR("file location and name here", dateCol=1, depthCol=3, > speed=FALSE, subsamp=1, concurrentCols=4:5) But I keep getting the following error: > Error: all(!is.na(time)) is not TRUE Al

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 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 11:37 AM, Les wrote:

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 followe

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

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, 383,388,394,408,460,489,499,523,524,535,562,569

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 wrote: > From: Bert Gunter > Subject: [R] A fortunes candidate? > To: "David Winsemius" > A fortunes candidate? > On Tue, Apr 5, 2011 at 3:59 PM, David Winsemius

[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, 748,778,786,797,955,968,1000,1245

[R] A fortunes candidate?

2011-04-05 Thread Bert Gunter
A fortunes candidate? On Tue, Apr 5, 2011 at 3:59 PM, David Winsemius wrote: ... " 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 or fight shy of them. If it

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

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 wrote: > > On Apr 2, 2011, at 4:21 AM, stan zimine wrote: > >> Hi. >> Googled but did not found the

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 associa

Re: [R] IFELSE function XXXX

2011-04-05 Thread Ben Bolker
William Dunlap 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, data3$input

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

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

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 Scott 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 contr

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] 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 workin

[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

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

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

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

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

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

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] 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 fd

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 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 rows. Using the > as.tabl

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 wrote: Hi, I summary() a variable w

[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 1,

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

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 wrote: > Hi, > > I summary() a variable with 409908 numeric observations. The variable is > part of a data.frame. The problem is t

[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 (2,1,4)

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

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

Re: [R] loop question

2011-04-05 Thread Joshua Wiley
Dear Thomas, On Tue, Apr 5, 2011 at 8:33 AM, Thomas 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]] : subscript out of bounds

[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] 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)),

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

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% l

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) {

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

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

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

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

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 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 not actually r

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 to

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 Th

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] 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 of

Re: [R] Time series example in Koop

2011-04-05 Thread Gabor Grothendieck
On Tue, Apr 5, 2011 at 8:35 AM, Ravi Kulkarni 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 coefficients th

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 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, >    scales=list(y=list(at=c(0,2,3 Par

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 wrote: > Dear R-useRs, > > I am looking for a why to perform the following

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, wrote: > >> On Fri, Mar 11, 2011 at 12:28 AM, >> 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 >> > xscale.component function but it does no

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

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

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 hav

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 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 > base graphics. > > H

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 wrote: > 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 t

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

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] 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 exc

Re: [R] converting "call" objects into character

2011-04-05 Thread Gabor Grothendieck
On Sun, Apr 3, 2011 at 12:14 PM, Samuel Le 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] 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) gap.barplot(twogrp,gap=c(8,16),xl

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

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

[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 + frailty(center,d

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

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 1

Re: [R] converting "call" objects into character

2011-04-05 Thread Samuel Le
3) cat() is a convenient test of the capacity of an object to be written to a file. It has an append parameter that implies it could serve the logging function requested by the OP. >>> >>> I can see "theCall" printed into the console, but I don't manage to >>

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

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 wel

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 conte

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 > Paul Murrell auckland.ac.nz> writes: > > > > > Hi > > > > On 28/03/2011 8:13 a.m., Al Roark wrote: > > > > > > Hi All: I've been struggl

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] 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" wrote in message news:BANLkTi=j2lf5syxytv1dd4k9wr0zgk8...@mail.gmail.com... > Is there a generic binary search routine in a standard library which > > a) works fo

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 fil

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 bosonde

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] do not execute newline command

2011-04-05 Thread Kenn Konstabel
On Tue, Apr 5, 2011 at 10:40 AM, Lorenzo Cattarino 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 (Repeat,

Re: [R] system() command in R

2011-04-05 Thread nandan amar
On 4 April 2011 16:54, rasanpreet kaur suri wrote: > 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 and proceed w

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] 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] Gr

[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 'textplot

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 P

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]

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

[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" comman