Re: [R] labels in rgl.sphere

2009-05-28 Thread Dieter Menne
Naoki Irie-3 wrote: > > I am using rgl.sphere to visualize scatter plot data in three dimensional > space. However, as I can not see the labels of each data point directly in > RGL window, I usually look for the values of x, y, z axis to find out the > label (or line number of the data poin

Re: [R] custom sort?

2009-05-28 Thread Wacek Kusnierczyk
Steve Jaffe wrote: > hmm, that is what I was afraid of. I considered that but thought to myself, > surely there must be an easier way. I wonder why this feature isn't > available. It's there in scripting languages, like perl, but also in > "hardcore" languages like C++ where std::sort and sorted c

Re: [R] RODBC package: how to check whether connection is open

2009-05-28 Thread Dieter Menne
Stavros Macrakis-2 wrote: > > What is the recommended way of checking whether an RODBC connection is > open? > > Since odbcValidChannel is not exported from namespace RODBC, I suppose I > shouldn't be using it. > > This is the best I could come up with, but it seems a bit 'dirty' to be > usin

Re: [R] String replacement in an expression

2009-05-28 Thread Wacek Kusnierczyk
William Dunlap wrote: > Bill Dunlap > TIBCO Software Inc - Spotfire Division > wdunlap tibco.com > > >> -Original Message- >> From: r-help-boun...@r-project.org >> [mailto:r-help-boun...@r-project.org] On Behalf Of Wacek Kusnierczyk >> Sent: Thursday, May 28, 2009 12:31 PM >> To: Caro

[R] Package Licences

2009-05-28 Thread Nathan S. Watson-Haigh
Are there any particular licences under which R packages must be released or is it the discretion of the author? The same question if the package is to be destined for CRAN? Kind regards, Nathan -- Dr. Nathan S. Watson-Haigh OCE Post Docto

[R] IP-Address

2009-05-28 Thread edwin Sendjaja
Hi, Is there any way to sort a tabel with a colum with IP-address? table: id rank color status ip 138 29746 yellow no 162.131.58.26 138 29746 red yes 162.131.58.16 138 29746 blue yes 162.131.58.10 138 29746 red no 162.131.58.17 138 29746 yellow no 162.131.58.14 138 29746 red no 162.131.58.

Re: [R] Step by step: Making an R package with Fortran 95

2009-05-28 Thread sjnovick
Thank you, Duncan. While your answers didn't quite fix my problems, I realized that I should probably "go with the flow". I installed gfortran and everything worked fine. Thanks again. Steve sjnovick wrote: > > To all. I need your help. The big question is: How do I make an R > l

[R] labels in rgl.sphere

2009-05-28 Thread Naoki Irie
Dear R list I am using rgl.sphere to visualize scatter plot data in three dimensional space. Thanks to the rgl library, I can easily find out the data point that I am interested in. However, as I can not see the labels of each data point directly in RGL window, I usually look for the valu

Re: [R] Drawing schematics

2009-05-28 Thread Gabor Grothendieck
Paul Murrel has an article about using grid graphics to do this. He also mentions specialized R packages that are specifically aimed at this task. http://journal.r-project.org/current.html On Thu, May 28, 2009 at 11:00 PM, George Chen wrote: > Hi, > > I would like to represent the treatment cour

[R] Drawing schematics

2009-05-28 Thread George Chen
Hi, I would like to represent the treatment course of a subject with an arrow representing passage through time and various ticks, arrows, or bars representing treatments done to the patient along the arrow. I would like to generate this sort of schematic for each patient in a database taking

[R] how do I decide the best number of observations in MLE?

2009-05-28 Thread Michael
Of course, in MLE, if we collect more and more observations data, MLE will perform better and better. But is there a way to find a bound on parameter estimate errors in order to decide when to stop collect data/observations, say 1000 observations are great, but 500 observations is good enough...

[R] GTK Tooltips under Linux

2009-05-28 Thread Ronggui Huang
Dear all, I want to set tool-tips for a gtkButton. I use the following code which works under Windows. However, it doesn't work under Linux. Any hints? Thanks. library(RGtk2) b<-gtkButtonNewWithLabel("OK") gtkTooltips()$setTip(b,"Memo for a Button.") gw <- gtkWindow(show=F) gw$Add(b) gw$Show() >

[R] I need help. about draw tree.

2009-05-28 Thread yongkook Kwon
Hello~ I have some ploblem. How can I draw tree picture after plsda. Please ,help me. script -- Result <- plsda(trainDescr, species, ncomp = 5, probMethod = "Bayes") [[alternative HT

Re: [R] custom sort?

2009-05-28 Thread Duncan Murdoch
On 28/05/2009 8:17 PM, Stavros Macrakis wrote: I couldn't get your suggested method to work: `==.foo` <- function(a,b) unclass(a)==unclass(b) `>.foo` <- function(a,b) unclass(a) < unclass(b) # invert comparison is.na.foo <- function(a)is.na(unclass(a)) sort(structure(sample(5),class

Re: [R] lattice::xyplot axis padding with fontfamily="mono"

2009-05-28 Thread Benjamin Tyner
Deepayan, Many thanks for the quick response and suggested workaround. Best, Ben Deepayan Sarkar wrote: On Wed, May 27, 2009 at 4:38 PM, Benjamin Tyner wrote: Hello, Say I have a predictor taking a very wide value: Data <- data.frame(pred="a",r

Re: [R] Still can't find missing data

2009-05-28 Thread Farley, Robert
That seems to work for the toy data. How do I implement this change with my real data, which are read from very large Stata and SPSS files and keep the factor definitions? Won't I be losing information (and creating a larger dataset) by not using the factor levels? How do I recover the facto

Re: [R] Error: argument is of length zero

2009-05-28 Thread jim holtman
I would assume that valsum is of zero length: > valsum <- numeric(0) > str(valsum) num(0) > if (valsum == 1) 1 Error in if (valsum == 1) 1 : argument is of length zero check your objects with 'str' On Thu, May 28, 2009 at 6:39 PM, Derek Lacoursiere wrote: > Hi, > > I have the following: > >

Re: [R] custom sort?

2009-05-28 Thread Stavros Macrakis
I couldn't get your suggested method to work: `==.foo` <- function(a,b) unclass(a)==unclass(b) `>.foo` <- function(a,b) unclass(a) < unclass(b) # invert comparison is.na.foo <- function(a)is.na(unclass(a)) sort(structure(sample(5),class="foo")) #-> 1:5 -- not reversed What am I mis

Re: [R] avoid a loop

2009-05-28 Thread Martin Morgan
Gabor Grothendieck wrote: Try this: sapply(1:n, function(i) sum(abs(outer(a, b, "-")-i)==0)) [1] 10 10 10 10 9 abs(outer(a, b, "-") - i) == 0 ==> outer(a, b, "-") == i. sum(outer(a, b, "-") == i) asks how many times i is an element of outer(a, b, "-"). This is tabulate(outer(a, b, "-"),

Re: [R] custom sort?

2009-05-28 Thread Duncan Murdoch
On 28/05/2009 6:06 PM, Steve Jaffe wrote: hmm, that is what I was afraid of. I considered that but thought to myself, surely there must be an easier way. I wonder why this feature isn't available. It's there in scripting languages, like perl, but also in "hardcore" languages like C++ where std::

[R] RODBC package: how to check whether connection is open

2009-05-28 Thread Stavros Macrakis
What is the recommended way of checking whether an RODBC connection is open? Since odbcValidChannel is not exported from namespace RODBC, I suppose I shouldn't be using it. This is the best I could come up with, but it seems a bit 'dirty' to be using a tryCatch for something like this: odbcOpe

Re: [R] Still can't find missing data

2009-05-28 Thread Farley, Robert
In this toy data, each of the tables should sum to None of the tables shows NA columns or rows. > > ToyData <- read.table("C:/Data/R/Toy.csv", header=TRUE, sep=",", > na.strings="NA", dec=".", row.names="ID_Num") > ToyData Data1 Data2 Data3 Weight 101

Re: [R] avoid a loop

2009-05-28 Thread Gabor Grothendieck
Try this: > sapply(1:n, function(i) sum(abs(outer(a, b, "-")-i)==0)) [1] 10 10 10 10 9 On Thu, May 28, 2009 at 5:45 PM, KARAVASILIS GEORGE wrote: > Hello, R users. > I have the following code: > > a=1:10 > b=-3:15 > n=5 > x <- rep(0,n) > for (i in 1:n) x[i] <- sum( outer(a,b, function(s,t)  ab

[R] Error: argument is of length zero

2009-05-28 Thread Derek Lacoursiere
Hi, I have the following: for(j in (y.raw+1):(rownum-1)){ valsum<-tstfframed[min.x,j]+tstfframed[min.x,j+1] if(valsum == 1){ cat("valsum loop") int.num<-int.num+1 } }

Re: [R] custom sort?

2009-05-28 Thread Stavros Macrakis
I agree that it is surprising that R doesn't provide a sort function with a comparison function as argument. Perhaps that is partly because calling out to a function for each comparison is relatively expensive; R prefers vector operations. That said, many useful custom sorts are easy to define by

Re: [R] avoid a loop

2009-05-28 Thread David Winsemius
On May 28, 2009, at 5:45 PM, KARAVASILIS GEORGE wrote: Hello, R users. I have the following code: a=1:10 b=-3:15 n=5 x <- rep(0,n) for (i in 1:n) x[i] <- sum( outer(a,b, function(s,t) abs(a-b-i)==0) ) You don't seem to be doing anything with s and t? Did you mean: for (i in 1:n) x[i] <- su

Re: [R] lattice::xyplot axis padding with fontfamily="mono"

2009-05-28 Thread Deepayan Sarkar
On Wed, May 27, 2009 at 4:38 PM, Benjamin Tyner wrote: > Hello, > > Say I have a predictor taking a very wide value: > >  Data <- data.frame(pred="a",resp=1) > >  print(xyplot(pred~resp, data=Data)) # enough y-axis padding to accommodate > the wide label > >

Re: [R] custom sort?

2009-05-28 Thread Steve Jaffe
hmm, that is what I was afraid of. I considered that but thought to myself, surely there must be an easier way. I wonder why this feature isn't available. It's there in scripting languages, like perl, but also in "hardcore" languages like C++ where std::sort and sorted containers allow the user t

Re: [R] max.col weirdness

2009-05-28 Thread Ben Bolker
Daryl Morris wrote: > > Hi, > Sorry, I was too hasty. I see that the tolerance is in the > documentation (and that "random" is the default tie-breaker). > > Would it be possible to allow tolerance to be a parameter? > > thanks, Daryl > > Could you just use apply(x,1,which.max) ? > x <

[R] Package for Clustering - Query

2009-05-28 Thread Lars Bishop
Dear R users, Is there any package for Latent Class Analysis (to be used in a clustering application) which supports mixed indicator variables (categorical and continuous)? Alternatively, is there any other clustering algorithm available that supports this type of data? Thanks in advance for you

Re: [R] custom sort?

2009-05-28 Thread Duncan Murdoch
On 28/05/2009 5:34 PM, Steve Jaffe wrote: Sounds simple but haven't been able to find it in docs: is it possible to sort a vector using a user-defined comparison function? Seems it must be, but "sort" doesn't seem to provide that option, nor does "order" sfaics You put a class on the vector (e

[R] avoid a loop

2009-05-28 Thread KARAVASILIS GEORGE
Hello, R users. I have the following code: a=1:10 b=-3:15 n=5 x <- rep(0,n) for (i in 1:n) x[i] <- sum( outer(a,b, function(s,t) abs(a-b-i)==0) ) Can someone tell me if I could avoid the for command? Thank you in advance. __ R-help@r-project.org mai

[R] why warning appears when set both 'scale' and 'breaks' meanwhile in heatmap.2 of gplots

2009-05-28 Thread Zheng, Xin (NIH) [C]
The warning I met with is attached here: Warning message: In heatmap.2(as.matrix(val.sf.ns[-1:-3]), Rowv = F, Colv = T, dendrogram = "column", : Using scale="row" or scale="column" when breaks arespecified can produce unpredictable results.Please consider using only one or the other. What d

[R] custom sort?

2009-05-28 Thread Steve Jaffe
Sounds simple but haven't been able to find it in docs: is it possible to sort a vector using a user-defined comparison function? Seems it must be, but "sort" doesn't seem to provide that option, nor does "order" sfaics -- View this message in context: http://www.nabble.com/custom-sort--tp23770

Re: [R] max.col weirdness

2009-05-28 Thread Bert Gunter
Try reading the man page, which says: Details When ties.method = "random", as per default, ties are broken at random. In this case, the determination of a tie assumes that the entries are probabilities: there is a relative tolerance of 1e-5, relative to the largest (in magnitude, omitting infinit

Re: [R] max.col weirdness

2009-05-28 Thread Daryl Morris
Hi, Sorry, I was too hasty. I see that the tolerance is in the documentation (and that "random" is the default tie-breaker). Would it be possible to allow tolerance to be a parameter? thanks, Daryl Daryl Morris wrote: Hi, I think there's some rounding issue with returning the max column.

Re: [R] sample unique pairs from a matrix

2009-05-28 Thread jos matejus
Dear All, Many thanks for all your useful suggestions. Much appreciated. Jos 2009/5/28 David Winsemius : > Your last step will either be a single number (not really a sampling > operation) or a > non-positive number. So at best you really only have an number that depends > entirely on the prior

[R] max.col weirdness

2009-05-28 Thread Daryl Morris
Hi, I think there's some rounding issue with returning the max column. (running 2.9.0 on an Apple, but my buddy found it on his PC) > x <- matrix(c(1234.568,1234.569,1234.567),1) > max.col(x) [1] 2 > x <- matrix(c(12345.568,12345.569,12345.567),1) > max.col(x) [1] 3 > x <- matrix(c(112345.568,

Re: [R] ggplot2 legend

2009-05-28 Thread Felipe Carrillo
Thanks for your help Mike, it works like a charm now!! --- On Thu, 5/28/09, Mike Lawrence wrote: > From: Mike Lawrence > Subject: Re: [R] ggplot2 legend > To: "Felipe Carrillo" > Cc: r-h...@stat.math.ethz.ch > Date: Thursday, May 28, 2009, 1:06 PM > First, your example didn't work > because f

Re: [R] How this addition works?

2009-05-28 Thread Luc Villandre
bogaso.christofer wrote: I have following addition : 1:2 + 1:10 [1] 2 4 4 6 6 8 8 10 10 12 I could not understand how R adding those two unequal vector? Any help? [[alternative HTML version deleted]] __ R-help@r-

Re: [R] ggplot2 legend

2009-05-28 Thread Mike Lawrence
First, your example didn't work because fish_ByMuestreo didn't build properly (deleting the first "structure(list(data = " bit solves this). To solve your plotting problem, note that as constructed, the Muestreo column is numeric, whereas you seem to want to treat it as a factor. Solution: convert

Re: [R] How this addition works?

2009-05-28 Thread Sarah Goslee
R recycles the shorter one to match the longer one: 1 2 3 4 5 6 7 8 9 10 + 1 2 1 2 1 2 1 2 1 2 = 2 4 4 6 6 8 8 10 10 12 R does this recycling in many cases, and it can sometimes trap the unwary. Sarah On Thu, May 28, 2009 at 4:00 PM, bogaso.christofer wrote: > I have f

Re: [R] How this addition works?

2009-05-28 Thread baptiste auguie
recycling rule: repeat the shorter element as many times as necessary, all.equal(1:2 + 1:10 , rep(1:2, length=10) + 1:10) # TRUE HTH, baptiste On 28 May 2009, at 22:00, bogaso.christofer wrote: I have following addition : 1:2 + 1:10 [1] 2 4 4 6 6 8 8 10 10 12 I could not unde

Re: [R] How this addition works?

2009-05-28 Thread Rolf Turner
On 29/05/2009, at 8:00 AM, bogaso.christofer wrote: I have following addition : 1:2 + 1:10 [1] 2 4 4 6 6 8 8 10 10 12 I could not understand how R adding those two unequal vector? Any help? Look at the help for ``+'' (?"+") and look at ``Value''. There you will see: Thes

Re: [R] Labeling barplot bars by multiple factors

2009-05-28 Thread Thomas Levine
Ah, that makes sense. But now another two issues have arisen. Firstly, the error bars look like confidence intervals, and I'm pretty sure that they are but does some document verify this? I suppose I could check the code too. Secondly, I just read about how dynamite plots should be avoided. It's

Re: [R] String replacement in an expression

2009-05-28 Thread William Dunlap
Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Wacek Kusnierczyk > Sent: Thursday, May 28, 2009 12:31 PM > To: Caroline Bazzoli > Cc: r-help@r-project.o

[R] filter function speed

2009-05-28 Thread Bishara, Anthony J
I am trying to use a linear filter to reduce loops and thereby increase the speed of an existing program. However, while the "filter" function (stats package) should have reduced the looping by about 30-fold, the time to complete the program remained about the same. This surprised me, because I

Re: [R] how to avoid add 'X' before numeric colnames when read.table

2009-05-28 Thread Zheng, Xin (NIH) [C]
substring(header, 2,) works for the purpose perfectly. Xin Zheng [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/p

[R] How this addition works?

2009-05-28 Thread bogaso.christofer
I have following addition : > 1:2 + 1:10 [1] 2 4 4 6 6 8 8 10 10 12 I could not understand how R adding those two unequal vector? Any help? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.

Re: [R] how to avoid add 'X' before numeric colnames when read.table

2009-05-28 Thread Zheng, Xin (NIH) [C]
Thank you guys. But I also want 'check.names' to help keeping colnames unique. It seems there's no proper option for that in 'read.table'. I have to alter colnames with strsplit or other similar functions. From: jim holtman [mailto:jholt...@gmail.com] Sent: Thursday, May 28, 2009 3:40 PM To: Zhe

Re: [R] how to avoid add 'X' before numeric colnames when read.table

2009-05-28 Thread Greg Snow
This really depends on where the 'X' is coming from, which you did not tell us (see the posting guide). For example, if the 'data.frame' function is the one adding the 'X', then you can use the 'check.names' argument to prevent the addition (or you can use data.frame with the argument to explic

Re: [R] how to avoid add 'X' before numeric colnames when read.table

2009-05-28 Thread jim holtman
?read.table check.names=FALSE On Thu, May 28, 2009 at 3:25 PM, Zheng, Xin (NIH) [C] wrote: > Hi all, > > Is there any way to keep numeric colnames as is? Any hint will be > appreicated. > > Xin Zheng > > >[[alternative HTML version deleted]] > > _

Re: [R] String replacement in an expression

2009-05-28 Thread Wacek Kusnierczyk
Caroline Bazzoli wrote: > Dear R-experts, > > I need to replace in an expression the character "Cl" by "Cl+beta" > > But in the following case: > > form<-expression((Cl-(V *ka) ) +(V *Vm *exp(-(Clm/Vm) *t))) > > gsub("Cl","(Cl+beta)",as.character(form)) > > We obtain: > > [1] "((Cl+beta) - (

[R] how to avoid add 'X' before numeric colnames when read.table

2009-05-28 Thread Zheng, Xin (NIH) [C]
Hi all, Is there any way to keep numeric colnames as is? Any hint will be appreicated. Xin Zheng [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] installing "gRain" package on ubuntu 8.10

2009-05-28 Thread Alex Biedermann
Dear all I am trying to install the "gRain" package on ubuntu 8.10, running R Vers. 2.9. Unfortunately, I get a bad Exit-Status. What could cause that problem? Any help is appreciated. Many thanks in advance. A. Biedermann install.packages("gRain") Warnung in install.packages("gRain") : Ar

Re: [R] plotting time series with data gap using type line- but do not want to connect gap with line

2009-05-28 Thread Gabor Grothendieck
Just place a point with an NA value between the two segments. Here is one way to do it in zoo: set.seed(123) library(zoo) # create sample data tt <- c(1:1000, 1200:2000) z <- zoo(rnorm(length(tt)), tt) # this will fill in omitted values with NAs z <- as.zoo(as.ts(z)) plot(z) On Thu, May 28,

[R] plotting time series with data gap using type line- but do not want to connect gap with line

2009-05-28 Thread Josef . Kardos
I have a time series of about 1500 measurements. There are sporadic data gaps. I would like to plot the time series with type "line". I only want a line to connect the periods with data; I don't want a line to connect the points across a data gap. Is there a function or recommended method t

Re: [R] Changing point color/character in qqmath

2009-05-28 Thread Kevin W
Apologies once more, there was a slight error in our example. Here is a correct version of how to color the points in qqmath according to another variable. qqmath(~ yield | variety, data = barley, groups=year, auto.key=TRUE, prepanel = function(x, ...) { list(xlim = range(q

[R] ggplot2 legend

2009-05-28 Thread Felipe Carrillo
Hi: I need some help with the legend. I got 14 samples(Muestreo) and I am trying to plot a smooth line for each sample. I am able to accomplish that but the problem is that the legend only displays every other sample. How can I force the legend to show all of my Muestreos? Thanks in advance.

Re: [R] Hmisc package: deff() command's formula for the design effect

2009-05-28 Thread jjh21
One additional question: It seems that in practice the design effect is often calculated on the response variable or on individual predictor variables. I have some OLS models using observational data that are clustered. Does it make sense to calculate the design effect on the residuals of one of

Re: [R] boxplot

2009-05-28 Thread Dieter Menne
amor Gandhi wrote: > > Hi gues, > This should read: Hi, guess what I want   amor Gandhi wrote: > > Is there any function in R for boxplot with different time points? > t1 <- c(rep(1,20),rep(2,20)) > t2 <- c(rep(1,10),rep(2,10),rep(1,10),rep(2,10)) > x <- rnorm(40,5,1) > dat <- data.frame(t1

Re: [R] String replacement in an expression

2009-05-28 Thread William Dunlap
> From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Caroline Bazzoli > Sent: Thursday, May 28, 2009 8:41 AM > To: r-help@r-project.org > Subject: [R] String replacement in an expression > > Dear R-experts, > > I need to replace in an expression the character

Re: [R] Neural Network resource

2009-05-28 Thread jude.ryan
The package AMORE appears to be more flexible, but I got very poor results using it when I tried to improve the predictive accuracy of a regression model. I don't understand all the options well enough to be able to fine tune it to get better predictions. However, using the nnet() function in packa

Re: [R] can you help me please :)

2009-05-28 Thread Stefan Grosse
On Thu, 28 May 2009 15:47:18 +0300 NOUF AL NUMAIR wrote: NAN> barplot(zz,width = 4,names.arg= xx,axes = TRUE, axisnames = TRUE, NAN> main=title,xlab=xlab,ylab=ylab,ylim=c(0,1175),xlim=c(0,226),col = NAN> c(for (i in zz){if i>70 col= "lightblue" else col= "mistyrose")) NAN> NAN> NAN> i tried to

[R] getTree visualization (randomForest)

2009-05-28 Thread Károly Kovács
Dear All, I would like to visualize a tree extracted from a random forest using getTree {randomForest}. I'm wondering if there is any way to do it directly or to convert my tree to any other class of tree repesentation, which then can be plotted? Thank you in advance, Karoly

Re: [R] String replacement in an expression

2009-05-28 Thread Gabor Grothendieck
Try matching on word boundaries as well: > gsub("\\bCl\\b","(Cl+beta)",as.character(form)) [1] "((Cl+beta) - (V * ka)) + (V * Vm * exp(-(Clm/Vm) * t))" See ?regexp On Thu, May 28, 2009 at 11:41 AM, Caroline Bazzoli wrote: > Dear R-experts, > > I need to replace in an expression the character "C

[R] String replacement in an expression

2009-05-28 Thread Caroline Bazzoli
Dear R-experts, I need to replace in an expression the character "Cl" by "Cl+beta" But in the following case: form<-expression((Cl-(V *ka) ) +(V *Vm *exp(-(Clm/Vm) *t))) gsub("Cl","(Cl+beta)",as.character(form)) We obtain: [1] "((Cl+beta) - (V * ka)) + (V * Vm * exp(-((Cl+beta)m/Vm) *

Re: [R] maximum over one dimension of a 3-dimensional array

2009-05-28 Thread David Winsemius
On May 28, 2009, at 11:25 AM, eric lee wrote: Hi, I'm running R 2.7.2 on windows XP. I'd like to find the maximum of a 3-d array over it's third index to create a 2-d array. For example: x <- array(c(1,2,3,10,11,12,3:8),c(2,3,2)) x , , 1 [,1] [,2] [,3] [1,]13 11 [2,]2

Re: [R] sample unique pairs from a matrix

2009-05-28 Thread David Winsemius
Your last step will either be a single number (not really a sampling operation) or a non-positive number. So at best you really only have an number that depends entirely on the prior sequence of draws. -- David. On May 28, 2009, at 8:21 AM, jos matejus wrote: Dear Ritchie and David, Thank

[R] maximum over one dimension of a 3-dimensional array

2009-05-28 Thread eric lee
Hi, I'm running R 2.7.2 on windows XP. I'd like to find the maximum of a 3-d array over it's third index to create a 2-d array. For example: > x <- array(c(1,2,3,10,11,12,3:8),c(2,3,2)) > x , , 1 [,1] [,2] [,3] [1,]13 11 [2,]2 10 12 , , 2 [,1] [,2] [,3] [1,]3

Re: [R] question about using a remote system

2009-05-28 Thread Greg Snow
Will R be able to send one batch of commands to the remote machine, then wait for the output? Or will there be back and forth with new commands based on the output from the first commands? You may want to look at the nws package for one way to have jobs run on a remote machine. -- Gregory (G

Re: [R] Plot error

2009-05-28 Thread Richard . Cotton
> I want to plot data such that the 3 time points(a,b,c) lie on the X-axis and > the values of these times points are on Y-axis for n samples (e.g.100). > > So, I have an object x, dim 100 4, it is a dataframe (when checked the > class) > x = > name a b c > 10.11 1.11 0.8

[R] Urgent Statistician Position near Philadelphia

2009-05-28 Thread José Ignacio Bustos Melo
Dear R-list, I know is going to be weird, but I need to do something about and I know the R-list is big group of good people. I’m moving to Philadelphia in August 2009 (my fiancé is there) and I need to find a job. I know to do so many things, but my skill is in science and research. I would like

[R] Changing data point size in quilt.plot

2009-05-28 Thread Wilson, R.C.
Hi, I am new to R and am using quilt.plot (from fields package) to plot gas concentrations in Europe. I am using the following code to plot my data library(maps) library(fields) test = read.csv("%change 1996_2005.txt", sep="\t") colnames(test) = c("Station", "Measurement_BaseO3", "Model_BaseO3"

[R] Plot error

2009-05-28 Thread NatsS
Hello, I am an R amateur. I want to plot data such that the 3 time points(a,b,c) lie on the X-axis and the values of these times points are on Y-axis for n samples (e.g.100). So, I have an object x, dim 100 4, it is a dataframe (when checked the class) x = name a b c 10.11

[R] re gularly spaced points on multi-segement line

2009-05-28 Thread PLAFF
Dear all ... I need your help for the following purpose : I would like to create regularly spaced points on a multi-segment line (a 'psp class' object). A function of the spatstat library( = pointsOnLines() ) is dedicated to that objective but the problem is that the probability of falling on a

Re: [R] Re ad & name multiple excel sheets using RODBC

2009-05-28 Thread Erich Neuwirth
Using the package rcom (by Thomas Baier) you can do everything you want since you have the full power of COM at your disposal. Dieter Menne wrote: > > > Hans-Peter Suter wrote: >>> If you only have the sheet names, you should use package xlsReadWrite >>> which >>> is rather fast, but has some l

Re: [R] Re ad & name multiple excel sheets using RODBC

2009-05-28 Thread Dieter Menne
Hans-Peter Suter wrote: > >> If you only have the sheet names, you should use package xlsReadWrite >> which >> is rather fast, but has some limitations in the non-commercial version. > > what limitations, i.e. features do you miss? > > Reading of named ranges. Dieter -- View this message

Re: [R] [Rd] split strings

2009-05-28 Thread William Dunlap
Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com > -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Wacek Kusnierczyk > Sent: Thursday, May 28, 2009 5:30 AM > Cc: R help project; r-de...@r-project.org; A

Re: [R] Re ad & name multiple excel sheets using RODBC

2009-05-28 Thread Hans-Peter Suter
2009/5/28 Dieter Menne : > If you only have the sheet names, you should use package xlsReadWrite which > is rather fast, but has some limitations in the non-commercial version. what limitations, i.e. features do you miss? Cheers, Hans-Peter __ R-help@r

Re: [R] How could I terminate a script (without leaving R)?

2009-05-28 Thread Duncan Murdoch
On 5/28/2009 8:58 AM, Mario Valle wrote: Good morning! Which is the preferred method to leave a sourced script and returning back to the '>' prompt? For example I search for certain files to be processed, but nothing should be done if they are not present. Normally I do in my script: f<-dir(pa

[R] can you help me please :)

2009-05-28 Thread NOUF AL NUMAIR
hi there :) i want to use barplot with if else but i dont know how to do it ? i tried this but it is not working with me SNP <- read.table("my.txt") >SNP[,2] [1] 1175 483 240 170 99 79 76 45 38 35 21 16 14 19 16 [16]333 1021686

Re: [R] R-help Digest, Vol 75, Issue 28

2009-05-28 Thread Ista Zahn
> >> From: Jeff Newmiller > >> To: "R Heberto Ghezzo, Dr" > >> Date: Wed, 27 May 2009 09:00:44 -0700 > >> Subject: Re: [R] R in Ubunto > >> R Heberto Ghezzo, Dr wrote: > >> > >>    Hello , I do not know anything abount Ubunto, but I found a Portable > >> Ubunto for Windows and since so many peop

[R] How could I terminate a script (without leaving R)?

2009-05-28 Thread Mario Valle
Good morning! Which is the preferred method to leave a sourced script and returning back to the '>' prompt? For example I search for certain files to be processed, but nothing should be done if they are not present. Normally I do in my script: f<-dir(pattern="qq") if(length(f) > 0) { ...proc

Re: [R] question about using a remote system

2009-05-28 Thread Erin Hodgess
My goal is for a user to sit down at a Linux laptop, get to an Rcmdr type screen, submit jobs on a remote system and then get the results back in R. We will assume that the user is naive, and the only thing he/she can do is get to the Rcmdr screen. The Rcmdr plugin will have a "submit jobs" menu.

Re: [R] Still can't find missing data

2009-05-28 Thread Dieter Menne
Farley, Robert wrote: > > I can't get the syntax that will allow me to show NA values (rows) in the > xtabs. > > lengthy non-reproducible example removed > If you want a reproducible answer, prepare a reproducible result. And check that the syntax is na.action=na.pass Dieter -- View

Re: [R] Re ad & name multiple excel sheets using RODBC

2009-05-28 Thread Dieter Menne
simeon duckworth wrote: > > I'd like to be able to read multiple sheets from an excel workbook and use > the sheet name to name the resulting dataframe using RODBC. > In Microsoft theory, something like the below should be ok (note the $), but never managed to get this to work. The same met

Re: [R] split strings

2009-05-28 Thread Wacek Kusnierczyk
(diverted to r-devel, a source code patch attached) Wacek Kusnierczyk wrote: > Allan Engelhardt wrote: > >> Immaterial, yes, but it is always good to test :) and your solution >> *is* faster and it is even faster if you can assume byte strings: >> > > :) > > indeed; though if the speed is

Re: [R] sample unique pairs from a matrix

2009-05-28 Thread jim holtman
This is one way of sampling all the values in the matrix that meet your criteria: > set.seed(1) > (x <- matrix(rnorm(100), 10)) [,1][,2][,3][,4] [,5] [,6][,7] [,8] [,9] [,10] [1,] -0.6264538 1.51178117 0.91897737 1.35867955 -

Re: [R] sample unique pairs from a matrix

2009-05-28 Thread jos matejus
Dear Ritchie and David, Thanks very much for your advice. I had thought of this potential solution, however it doesn't really fullfill my second criteria which is that once a particular cell has been sampled, the row and column of that cell can't be sampled from subsequently. In other words, the n

Re: [R] Labeling barplot bars by multiple factors

2009-05-28 Thread Thomas Levine
Both of those worked, but hierobarp looked a bit easier, so I used that. The one annoying thing is that it sorts alphabetically. Tom On Thu, May 28, 2009 at 6:46 AM, Jim Lemon wrote: > Thomas Levine wrote: > >> I want to plot quantitative data as a function of three two-level factors. >> How do

Re: [R] How do I get removed from this mailing list?

2009-05-28 Thread Peter Dalgaard
Wacek Kusnierczyk wrote: > Gavin Simpson wrote: >> The "View message source" would be a more direct way of viewing the full >> email, not just the bits TBird shows you in the preview pane. I forget >> how it is named exactly and under which menu it is found as it has been >> quite a while since I u

Re: [R] Full likelihood from survreg

2009-05-28 Thread Terry Therneau
> How can I find out what survreg generates: the full likelihood or a > likelihood with "unnecessary" constants dropped? Survreg returns a log-likelihood, not a deviance (LL with parameters dropped); and the result is labeled as such. It turns out that the deviance is not as easily defined f

[R] Read & name multiple excel sheets using RODBC

2009-05-28 Thread simeon duckworth
I'd like to be able to read multiple sheets from an excel workbook and use the sheet name to name the resulting dataframe using RODBC. at the moment i've figured out how to do it the long way (see below) but feel sure that there is a speedier & possibly automatic way to do it in R. i've tried to

Re: [R] no internal function "int.unzip" in R 2.9.0 for Windows

2009-05-28 Thread Uwe Ligges
Will respond privately, since the thread becomes uninteresting for R-help, I guess. Uwe Romain Francois wrote: Hello Uwe, I have recently taken over maintenance of the package, which is now version controlled at r-forge (http://r-forge.r-project.org/projects/r2html/), and I am planning the

Re: [R] sample unique pairs from a matrix

2009-05-28 Thread David Winsemius
On May 28, 2009, at 6:33 AM, jos matejus wrote: Dear R users, I have a matrix of both negative and positive values that I would like to randomly sample with the following 2 conditions: 1. only sample positive values 2. once a cell in the matrix has been sampled the row and column of that cell

Re: [R] consultation

2009-05-28 Thread David Winsemius
http://cran.r-project.org/web/views/Survival.html On May 11, 2009, at 1:46 PM, Nancy Tejerina wrote: *Dear R Users;* * * *I´m writing to ask you how can I do Survivals Curves using Time- dependent covariates? Which packages I need to Install?* *Thanks for your help, I look foward you reply

Re: [R] sample unique pairs from a matrix

2009-05-28 Thread Richard . Cotton
> I have a matrix of both negative and positive values that I would like > to randomly sample with the following 2 conditions: > > 1. only sample positive values > 2. once a cell in the matrix has been sampled the row and column of > that cell cannot be sampled from again. > > #some dummy data >

Re: [R] R connectivity with Oracle DB

2009-05-28 Thread Duncan Murdoch
On 28/05/2009 6:03 AM, Madan Mohan wrote: Hi Friends, I am working on R-2.9.0 and i want to connect oracle through R, but i could not find ROracle (zip file for windows) on CRAN Packages. Can anyone suggest me how to connect Oracle from R in windows platform? I would be grateful if u can provide

Re: [R] "1L" and "0L"

2009-05-28 Thread Duncan Murdoch
On 28/05/2009 3:20 AM, bogaso.christofer wrote: Hi, Recently I come through those R-expressions and understood that "1L" means "1" and "0L" means "0". Why they are so? I mean, what the excess meanings they carry, instead writing simple "1" or "0"? Is there any more this kind of expressions in R

  1   2   >