Re: [R] Problems with NA's

2007-11-20 Thread leffgh
somewhere I read that " !is.na(your_vector)" is better than "your_vector!=NA" . Thomas L Jones, PhD wrote: > > Difficulty handling NA's: > Assume that I have a numeric vector y. For simplicity, assume that it has > 10 > elements. Assume that the third element has the value NA. I give it the >

[R] Calculating AUC from ROCR

2007-11-20 Thread G Ilhamto
Dear R-helper, I am working with ROCR of Tobias Sing et. al. to compare the performances of logistic and nnet models on a binary response. I had the performance plots, but I have problem finding out other performance statistics (eg. MSE/ASE, AUC). Any help on this? Thanks Ilham [[altern

[R] problem modeling time series

2007-11-20 Thread eugen pircalabelu
Good afternoon! I'm trying to model a ts but unfortunately i'.m very new to this kind of modeling so i 'll be very grateful if you have an advice. This was my syntax: t<-c(16115,17391,19011,20256,19034,18851,20016,18088,19166,21163,18463,19397,15800,16113,18879,20598,17252,19753,19110,19605,2

[R] equivalent of Matlab robustfit?

2007-11-20 Thread Darren Weber
Hi, I've been using the Matlab robustfit function for linear regressions where I suspect some data points are outliers. Is there an equivalent function in R? Take care, Darren PS, This is the Matlab help on robustfit: >> help robustfit ROBUSTFIT Robust linear regression B = ROBUSTFIT(X,Y)

Re: [R] skewness: generating distribution and estimating M3.

2007-11-20 Thread Matthias Kohl
Dear Milton, package distrEx has methods to compute skewness. library(distrEx) ?skewness To generate new distributions you could use package distr. hth, Matthias Milton Cezar Ribeiro wrote: > Dear all, > > How can I generate values which distrituions have left or rigth skewness. > After that,

Re: [R] Manipulating x axis in stripchart

2007-11-20 Thread Gabor Grothendieck
If its ok to use lattice try this: library(lattice) # no attach needed # we want VC to be first level, not OJ ToothGrowth$supp <- relevel(ToothGrowth$supp, "VC") # rename levels levels(ToothGrowth$supp) <- c("A", "B") # plot dotplot(len ~ supp | dose, ToothGrowth, layout = c(3, 1)) On Nov 20

Re: [R] How to select rows with identical index from two matrix?

2007-11-20 Thread Moshe Olshansky
You can do the following: set1 <- Matrix1[,1] set2 <- Matrix2[,1] common <- intersect(set1,set2) ind1 <- which(set1 %in% common) ind2 <- which(set2 %in% common) A1 <- Matrix1[ind1,-1] A2 <- Matrix2[ind2,-1] and if you wish, rownames(A1) <- common rownames(A2) <- common --- "C.S. Liu" <[EMAIL P

[R] Manipulating x axis in stripchart

2007-11-20 Thread Judith Flores
Hi all, I I need to manipulate the x axis in a stripchart. I will use one of the data sets included in R to explain what I need to do. attach(ToothGrowth) stripchart(len[supp=='VC']~dose[supp=='VC'], vertical=TRUE, group.names=c('A','A','A')) stripchart(len[supp=='OJ']~dose[supp=='OJ'], add=

[R] How to select rows with identical index from two matrix?

2007-11-20 Thread C.S. Liu
Dear list, I have two martix like these, each rows with name in the matrix. I try to select rows with identical name from two matrix and calculate their correlation. Matrix1: 2-Sep9 5.51 7.18 10.08 139.45 2-Sep7 4.915 8.22 61.68 9 123.

Re: [R] rowSums() and is.integer()

2007-11-20 Thread Tim Hesterberg
I wrote the original rowSums (in S-PLUS). There, rowSums() does not coerce integer to double. However, one advantage of coercion is to avoid integer overflow. Tim Hesterberg >... So, why does rowSums() coerce to double (behaviour >that is undesirable for me)? __

[R] problem with nb2listw

2007-11-20 Thread dagenais
Hi, I am a new student to R and I was hoping someone could help me with the error message I keep getting when I try to use the nb2listw() function. I have 45 sites and I want to get an autocorrelation value for sites within 1000m of each other. coords<-cbind(EAST,NORTH) coords<-as.matrix(co

Re: [R] Is there a simpler way to do this?

2007-11-20 Thread Marc Schwartz
On Tue, 2007-11-20 at 17:13 -0800, Anup Nandialath wrote: > Dear Friends, > > My objective is to do element wise multiplication of two vectors. For example > suppose I have > > a <- (1,1,1) > b <- (2,4) > > My output should be (2,4,2,4,2,4). I managed to write it down with loops as > follows

[R] Is there a simpler way to do this?

2007-11-20 Thread Anup Nandialath
Dear Friends, My objective is to do element wise multiplication of two vectors. For example suppose I have a <- (1,1,1) b <- (2,4) My output should be (2,4,2,4,2,4). I managed to write it down with loops as follows r <- c(1,1,1) l <- c(2,4) x <- 1 for (j in 1:3) { for (i in 1:2) {

Re: [R] Vectorization/Speed Problem

2007-11-20 Thread Gabor Grothendieck
Let x be the input vector and cx be the cumulative running sum of it. Then seq_along(cx) - match(cx, cx) gives increasing sequences starting at 0 and for those after the leading zeros we start them at 1 by adding cummax(x). x <- c(0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0) # input cx <- cumsum(x)

Re: [R] Logarithmic axis

2007-11-20 Thread Julian Burgos
Like always, there is much to be learned from the R-help list! Another message had a much simpler approach. plot(xy.coords(reizstaerke, kennlinie1, log="x"), log="x") Julian Julian Burgos wrote: > Hey John, > > You can do simply > > plot(reizstaerke, kennlinie1, ylim=c(0, max(kennlinie1, >

Re: [R] Logarithmic axis

2007-11-20 Thread Julian Burgos
Hey John, You can do simply plot(reizstaerke, kennlinie1, ylim=c(0, max(kennlinie1, kennlinie2)),log="x") but if you want to fine tune where the tick marks are, you can do it "by hand". kennlinie1 <- c(8.0746909, 3.9916973, 9.9789444, 19.962869); kennlinie2 <- c(6.0994206, 8.9661081, 19.924

Re: [R] display basename

2007-11-20 Thread Bert Gunter
Of course. I was just putting it inline to be as minimalist as possible... I'm in a minimal mood today... -- Bert Bert Gunter Nonclinical Statistics 7-7374 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Henrik Bengtsson Sent: Tuesday, November 20, 200

[R] Vectorization/Speed Problem

2007-11-20 Thread Tom Johnson
Hi, I cannot find a 'vectorized' solution to this 'for loop' kind of problem. Do you see a vectorized, fast-running solution? Objective: Take the value of X at each timepoint and calculate the corresponding value of Y. Leading 0's and all 1's for X are assigned to Y; otherwise Y is incremented b

Re: [R] barplot problem

2007-11-20 Thread pieterprovoost
Thanks guys, that's exactly what I was looking for! Pieter -- This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com http://www.opensubscriber.com/message/r-help@r-project.org/8030546.html __ R-help@r-project.org mailing list https:

Re: [R] display basename

2007-11-20 Thread Henrik Bengtsson
So why not suggest pathname <- file.choose() z <- read.table(pathname, dec=".", header=TRUE) instead. /Henrik On Nov 20, 2007 2:58 PM, Bert Gunter <[EMAIL PROTECTED]> wrote: > z=read.table(chosen <- file.choose(),dec=".",header=TRUE) > > will assign the return value of file.choose (the path nam

[R] skewness: generating distribution and estimating M3.

2007-11-20 Thread Milton Cezar Ribeiro
Dear all, How can I generate values which distrituions have left or rigth skewness. After that, which function compute the skewness of each distributions? Kind regards. miltinho para armazenamento! [[alternative HTML version deleted]] __

Re: [R] display basename

2007-11-20 Thread Bert Gunter
z=read.table(chosen <- file.choose(),dec=".",header=TRUE) will assign the return value of file.choose (the path names of the file as a character string) to chosen. This sort of code is seductive, but I find it quite difficult to read. I have also gotten myself into trouble from time to time doin

[R] display basename

2007-11-20 Thread mysimbaa
Hello everybody, I'm sorry for asking a dumb question, but I don't find how to loos it. I need to display the name of the choosing file using this command : z=read.table(file.choose(),dec=".",header=TRUE) Thanks for any help. -- View this message in context: http://www.nabble.com/display-bas

Re: [R] Trying to get around R

2007-11-20 Thread Loren Engrav
Hi and thank you Discussion is surely tough via the web And I have trouble with "tone" also, and English My only point was that Epselon <[EMAIL PROTECTED]> received education but not much encouragement IMO and With the method of Bolker, it might be possible to achieve both for newbies, ie both e

Re: [R] Adding points on top of lines in xyplot [solved]

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > > > > > [...] > > > > > > > Example: > > > > library(lattice) > > >

Re: [R] Problems with NA's

2007-11-20 Thread J. R. M. Hosking
Thomas L Jones, PhD wrote: > Difficulty handling NA's: > Assume that I have a numeric vector y. For simplicity, assume that it has 10 > elements. Assume that the third element has the value NA. I give it the > following: > NA_test <- function (){ > y <- numeric (10) > y [3] <- NA > if (y [3] != N

Re: [R] Process multiple columns of data.frame

2007-11-20 Thread Thompson, David (MNR)
I did specify only the three columns of interest c('bd.n','ht.n','dbh.n') as the second (column) index, and I did superficially check the results which turned out as I had hoped. Only the three columns listed were changed and existing values _in_ those columns were retained. So, I appear to be on m

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > > > [...] > > > > > Example: > > > library(lattice) > > > > > > # generate some data: > > > resp <- rnorm(100) > > > pred <-

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > [...] > > > Example: > > library(lattice) > > > > # generate some data: > > resp <- rnorm(100) > > pred <- resp*1.5 + rnorm(100) > > d <- data.frame(resp=resp, pred=pred) > > > > # add

Re: [R] Process multiple columns of data.frame

2007-11-20 Thread jim holtman
The problem with that solution is that if any of the columns in a row has an NA in it, then all the columns of that row will be set to zero. Is the what you want, or do you only want the specific entries set to 0? On Nov 20, 2007 4:07 PM, Thompson, David (MNR) <[EMAIL PROTECTED]> wrote: > Jim, >

Re: [R] Problem with code for bootstrapping chi square test with count data

2007-11-20 Thread Prof Brian Ripley
On Tue, 20 Nov 2007, Geertje Van der Heijden wrote: > Hi, > > I'd like some advice on bootstrapping in R. > > I have a species x with 20 individuals and a factor containing 0 and 1's > (in this case 5 zeros and 15 ones). I want to compare the frequency of > the occurrence of 1 with a probability v

Re: [R] Process multiple columns of data.frame

2007-11-20 Thread Thompson, David (MNR)
Jim, What I'm getting at is my lack of understanding when manipulating data frame indices. I have tried something like your matrix example with variants of: Bout[ is.na(Bout[,c('bd.n','ht.n','dbh.n')]), ] <- 0 only to receive the following error message: Error in `[<-.data.frame`(`*tmp*`, is.na(B

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: [...] > Example: > library(lattice) > > # generate some data: > resp <- rnorm(100) > pred <- resp*1.5 + rnorm(100) > d <- data.frame(resp=resp, pred=pred) > > # add a grouping factor: > d$grp <- gl(4, 25, labels=letters[1:4]) > > # plot: loo

Re: [R] Loc function in R??

2007-11-20 Thread David Scott
?which On Tue, 20 Nov 2007, Barb, Jennifer (NIH/CIT) [E] wrote: > Does anyone know which function (if any) will return the index of the > true locations in a Boolean vector? > > > > For instance: > > A=c(1,3,5,7,4); > > B=c(2,4,77,3,3); > > X=A > > > So X is: > >> X > > [1] TRUE TRUE TRUE FA

Re: [R] Loc function in R??

2007-11-20 Thread Dimitris Rizopoulos
try: which(X) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.

Re: [R] Loc function in R??

2007-11-20 Thread Benilton Carvalho
which(A < B) On Nov 20, 2007, at 3:06 PM, Barb, Jennifer (NIH/CIT) [E] wrote: > Does anyone know which function (if any) will return the index of the > true locations in a Boolean vector? > > > > For instance: > > A=c(1,3,5,7,4); > > B=c(2,4,77,3,3); > > X=A > > > So X is: > >> X > > [1] TRUE

Re: [R] Loc function in R??

2007-11-20 Thread Rolf Turner
?which On 21/11/2007, at 9:06 AM, Barb, Jennifer (NIH/CIT) [E] wrote: > Does anyone know which function (if any) will return the index of the > true locations in a Boolean vector? > > > > For instance: > > A=c(1,3,5,7,4); > > B=c(2,4,77,3,3); > > X=A > > > So X is: > >> X > > [1] TRUE TRUE TRU

Re: [R] Loc function in R??

2007-11-20 Thread Kuhn, Max
?which > which(X) [1] 1 2 3 Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barb, Jennifer (NIH/CIT) [E] Sent: Tuesday, November 20, 2007 3:07 PM To: [EMAIL PROTECTED] Subject: [R] Loc function in R?? Does anyone know which function (if any) will r

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > > On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> > > > > wrote: > > > > All, > > > > > > > > I'm trying to make a

[R] Loc function in R??

2007-11-20 Thread Barb, Jennifer (NIH/CIT) [E]
Does anyone know which function (if any) will return the index of the true locations in a Boolean vector? For instance: A=c(1,3,5,7,4); B=c(2,4,77,3,3); X=A X [1] TRUE TRUE TRUE FALSE FALSE I'd like to know if there is a function that will tell me the locations of where the TRUE valu

[R] asymptote

2007-11-20 Thread Alexy Khrabrov
I have a graph which looks like hyperbole. I'd like to fit a straight line to the lower segment going to infinity, approaching the X axis -- I'm interested in the angle. If I'd do it manually, I'd cut off a certain initial part of the range, [0..x_min], and then do an lm with the rest. Y

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Rolf Turner
On 21/11/2007, at 8:40 AM, Deepayan Sarkar wrote: > There's a way to do almost everything, but we need a reproducible > example (preferably minimal) and a clear statement of what you want to > do to help. Is this a candidate for fortune() ? cheers,

Re: [R] barplot problem

2007-11-20 Thread Tyler Smith
On 2007-11-20, jim holtman <[EMAIL PROTECTED]> wrote: > Does something like this work for you? You can vary the mgp parameter > for placement of the label. > You can also use mtext to place the axis label separately: barplot(rev(modelledprofile),horiz=TRUE,xlim=c(0,1),col="cornflowerblue",names.

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On 11/20/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > On Tuesday 20 November 2007, Deepayan Sarkar wrote: > > On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> > wrote: > > > All, > > > > > > I'm trying to make a basic plot: data points superimposed upon the a line > > > connecting

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: > On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> wrote: > > All, > > > > I'm trying to make a basic plot: data points superimposed upon the a line > > connecting the points w/ a different color. Example below doesn't work > > as

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Gabor Grothendieck
Try this: xyplot(y ~ Hour, xlab = list("Hour", font=2, cex=2), ylab= list("U_x * V", font=2, cex=2), type = 'l', scales = list( x= list(tick.number=5, cex=2, limits=c(0,4.5)), y=list(cex=0)), lines=TRUE, lwd = 2) trellis.focus("panel", 1, 1, highlight = FALSE) print(panel.points(Hour, y, pch = 16

Re: [R] Process multiple columns of data.frame

2007-11-20 Thread jim holtman
It really depends on what you want to set the values that contain NAs to for the various type of the columns. Do you always want numerics =0, characters ="", and factors =whatever? Do you want to do this for all the columns in a dataframe? If you want to it for all the columns in a matrix, it is

Re: [R] R and reading matlab compressed files

2007-11-20 Thread John C Frain
According to the Octave manual (page 146 of Edition 3 for Octave version 2.9.16) Octave can read Matlab version 7 files. It can also output with similar options to Matlab. As there are no issues or licencing problems when running Octave and R on the one machine. Note that there is a new native W

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Deepayan Sarkar
On Nov 20, 2007 11:14 AM, David Afshartous <[EMAIL PROTECTED]> wrote: > > All, > > I'm trying to make a basic plot: data points superimposed upon the a line > connecting the points w/ a different color. Example below doesn't work as > the first xyplot call doesn't remain. Suggestions? xyplot(y ~

Re: [R] Trying to get around R

2007-11-20 Thread Julian Burgos
Hi Loren, It wasn't my intention to sound arrogant, cruel or "off putting". English is not my first language, and perhaps my message had a tone I did not intended. The person posting the message I responded was literally asking for somebody on the list to do his/hers homework (there are even refe

[R] Adding points on top of lines in xyplot

2007-11-20 Thread David Afshartous
All, I'm trying to make a basic plot: data points superimposed upon the a line connecting the points w/ a different color. Example below doesn't work as the first xyplot call doesn't remain. Suggestions? David Hour = c(NA,1,2,3,4) y = c(2,2,3,2,1.5) xyplot(y ~ Hour, xlab = list("Hour", font

Re: [R] R 2 UDB

2007-11-20 Thread Prof Brian Ripley
On Tue, 20 Nov 2007, Duncan Murdoch wrote: > On 11/20/2007 12:56 PM, Michael Grishin wrote: >> I am running R on the linux platform. Is there any way to connect to >> UDB(DB2) dbms? How? > > I don't know that dbms at all, but if it supports ODBC, then the RODBC > package should be able to talk t

Re: [R] Logarithmic axis

2007-11-20 Thread Gabor Grothendieck
See: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/57255.html On Nov 20, 2007 1:21 PM, John Wiedenhoeft <[EMAIL PROTECTED]> wrote: > Hi there, > > I guess this must be a standard issue, but I'm starting to go crazy with it. I > simply want a plot with the x axis being logarithmic, having labels

Re: [R] R 2 UDB

2007-11-20 Thread Marc Schwartz
On Tue, 2007-11-20 at 13:30 -0500, Duncan Murdoch wrote: > On 11/20/2007 12:56 PM, Michael Grishin wrote: > > I am running R on the linux platform. Is there any way to connect to > > UDB(DB2) dbms? How? > > I don't know that dbms at all, but if it supports ODBC, then the RODBC > package shoul

Re: [R] barplot problem

2007-11-20 Thread jim holtman
Does something like this work for you? You can vary the mgp parameter for placement of the label. modelledprofile <- c(7.072289e-01, 2.625354e-01, 2.932886e-02, 8.986474e-04, 8.155270e-06, 2.537943e-08, 3.137954e-11, 1.729522e-14, 4.579875e-18, 6.069698e-22, 4.100828e-26, 1.423359e-30, 1.272139e

Re: [R] R 2 UDB

2007-11-20 Thread Duncan Murdoch
On 11/20/2007 12:56 PM, Michael Grishin wrote: > I am running R on the linux platform. Is there any way to connect to > UDB(DB2) dbms? How? I don't know that dbms at all, but if it supports ODBC, then the RODBC package should be able to talk to it. Duncan Murdoch

[R] Logarithmic axis

2007-11-20 Thread John Wiedenhoeft
Hi there, I guess this must be a standard issue, but I'm starting to go crazy with it. I simply want a plot with the x axis being logarithmic, having labels 1, 10, 100..., and ten unlabelled ticks between each of them - just as they introduce logarithmic axis at school. I've played around a bit

[R] Logarithmic axis

2007-11-20 Thread John Wiedenhoeft
Hi there, I guess this must be a standard issue, but I'm starting to go crazy with it. I simply want a plot with the x axis being logarithmic, having labels 1, 10, 100..., and ten unlabelled ticks between each of them - just as they introduce logarithmic axis at school. I've played around a bit

[R] R 2 UDB

2007-11-20 Thread Michael Grishin
I am running R on the linux platform. Is there any way to connect to UDB(DB2) dbms? How? Thanks, Michael Grishin - DTCC DISCLAIMER: This email and any files transmitted with it are confidential a

Re: [R] Use and misuse of "update" function for non-models. Any views/recommendations??

2007-11-20 Thread Douglas Bates
On Nov 20, 2007 10:29 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > update already has formula and packageStatus methods so its > being extended beyond models already even within core packages. Also, update methods are extensively used for the "other kind" of graphs in the lattice package.

Re: [R] xy.coords and log10

2007-11-20 Thread Duncan Murdoch
On 11/20/2007 11:22 AM, Alexy Khrabrov wrote: > xy.coords can have a log="xy" parameter which then plot interprets to > use log scale. > I wonder whether plot can be instructed in a similar way to use log10 > scale instead of natural logs. I still don't see the problem. When I do > x <- 1:1

[R] Process multiple columns of data.frame

2007-11-20 Thread Thompson, David (MNR)
Hello, How do I do the following more concisely? Bout[is.na(Bout$bd.n), 'bd.n'] <- 0 Bout[is.na(Bout$ht.n), 'ht.n'] <- 0 Bout[is.na(Bout$dbh.n), 'dbh.n'] <- 0 Would the form of such a command be different between numeric, character and factor columns? . . . between data.f

Re: [R] barplot problem

2007-11-20 Thread pieterprovoost
Here's an example of my problem: modelledprofile <- c(7.072289e-01, 2.625354e-01, 2.932886e-02, 8.986474e-04, 8.155270e-06, 2.537943e-08, 3.137954e-11, 1.729522e-14, 4.579875e-18, 6.069698e-22, 4.100828e-26, 1.423359e-30, 1.272139e-35, 5.449925e-46, 1.431925e-57, 1.629660e-70) depthnames <- c

Re: [R] xy.coords and log10

2007-11-20 Thread ONKELINX, Thierry
Have a look at scale_x_log10() and scale_y_log10() from the ggplot2 package. The helpfile with some examples is at http://had.co.nz/ggplot2/scale_continuous.html HTH, Thierry ir. Thierry Onkelinx Instituut voor natu

[R] try FlexMix RE: mulitmodal distributions

2007-11-20 Thread Karen.Green
Hi, Marion, I believe the package FlexMix provides a more generalized version of finite mixture modeling than is found in mclust/mclust02. Please see: http://cran.r-project.org/doc/vignettes/flexmix/flexmix-intro.pdf Karen --- Karen M. Green, Ph.D. [EMAIL PROTECTED] Research Investigator

Re: [R] print " character

2007-11-20 Thread Martin Maechler
> "LRC" == Luis Ridao Cruz <[EMAIL PROTECTED]> > on Tue, 20 Nov 2007 15:57:07 + writes: LRC> R-help, LRC> Sorry if this question has been discussed/posted before LRC> but I can't just find it myself. LRC> How can I print the comment character (") ? Note that ' "

Re: [R] Use and misuse of "update" function for non-models. Any views/recommendations??

2007-11-20 Thread Gabor Grothendieck
update already has formula and packageStatus methods so its being extended beyond models already even within core packages. On Nov 20, 2007 8:54 AM, Luke Tierney <[EMAIL PROTECTED]> wrote: > On Tue, 20 Nov 2007, Prof Brian Ripley wrote: > > > update() is generic, so the recommended approach would

Re: [R] as.character(seq(-.35,.95,.1))

2007-11-20 Thread Marc Schwartz
On Tue, 2007-11-20 at 11:07 -0500, Duncan Murdoch wrote: > On 11/20/2007 10:50 AM, Ken Fullish wrote: > > > as.character(seq(-.25,.95,.1)) > > [1] "-0.25" "-0.15" "-0.05" "0.05" "0.15" "0.25" "0.35" "0.45" > > "0.55" "0.65" "0.75" "0.85" "0.95" > > > > > as.character(seq(-.35,.95,.

Re: [R] xy.coords and log10

2007-11-20 Thread Alexy Khrabrov
xy.coords can have a log="xy" parameter which then plot interprets to use log scale. I wonder whether plot can be instructed in a similar way to use log10 scale instead of natural logs. Cheers, Alexy On Nov 20, 2007, at 7:01 PM, Duncan Murdoch wrote: > On 11/20/2007 10:41 AM, Alexy Khrabrov

Re: [R] Use and misuse of "update" function for non-models. Any views/recommendations??

2007-11-20 Thread Gavin Simpson
On Tue, 2007-11-20 at 16:32 +0100, Søren Højsgaard wrote: > Thanks, Luke Tierney - the documentation of update was exactly what > prompted my question. Yet, I conclude that writing an update.myobject > method is OK. I think Luke's point was that whilst it would be OK if you wrote your own method i

[R] barplot problem

2007-11-20 Thread pieterprovoost
Hello, I'm trying to find out how I can move the y axis label of a horizontal barplot further away from the axis, in order to avoid overlap between the names (which I have rotated using las=1) and the label. I have been fiddling with the graphical parameters but nothing seems to work. Maybe a g

[R] Problems with fonts on linux using GDD

2007-11-20 Thread michael watson (IAH-C)
Hi Apologies for this question. I have read the help for GDD and font mapping, and it tells me that the config file, /usr/lib/R/library/GDD/fonts/basefont.mapping is responsible for mapping fonts to the GDD library. However: > .GDD.font() [1] "/usr/X11R6/lib/X11/fonts/Type1/l048013t.afm" [2] "/

Re: [R] Canonical Correlation Analysis

2007-11-20 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Animesh Acharjee > Sent: Tuesday, November 20, 2007 7:47 AM > To: [EMAIL PROTECTED] > Subject: [R] Canonical Correlation Analysis > > Dear Sir/Madam, > This is Animesh work

Re: [R] as.character(seq(-.35,.95,.1))

2007-11-20 Thread Duncan Murdoch
On 11/20/2007 10:50 AM, Ken Fullish wrote: > > as.character(seq(-.25,.95,.1)) > [1] "-0.25" "-0.15" "-0.05" "0.05" "0.15" "0.25" "0.35" "0.45" > "0.55" "0.65" "0.75" "0.85" "0.95" > > > as.character(seq(-.35,.95,.1)) > [1] "-0.35" "-0.25" > "-0.15"

Re: [R] as.character(seq(-.35,.95,.1))

2007-11-20 Thread jim holtman
see FAQ 7.31 On Nov 20, 2007 10:50 AM, Ken Fullish <[EMAIL PROTECTED]> wrote: > > > as.character(seq(-.25,.95,.1)) > [1] "-0.25" "-0.15" "-0.05" "0.05" "0.15" "0.25" "0.35" "0.45" > "0.55" "0.65" "0.75" "0.85" "0.95" > > > as.character(seq(-.35,.95,.1)) > [1] "-0.35" "-0.

[R] Move R to a clean Linux install from an old install

2007-11-20 Thread Pekka Horttanainen
Hi everybody! I just joined, I started using R a few weeks ago and it seems to be a really versatile system. Last weekend I half-accidentally installed all R packages to my computer. Independent of this (at least I hope), I managed to break my Kubuntu's KDE and so far haven't been able to repair it

[R] print " character

2007-11-20 Thread Luis Ridao Cruz
R-help, Sorry if this question has been discussed/posted before but I can't just find it myself. How can I print the comment character (") ? Thanks in advance __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] xy.coords and log10

2007-11-20 Thread Duncan Murdoch
On 11/20/2007 10:41 AM, Alexy Khrabrov wrote: > Is there a way to teach xy.coords, when given log="xy", or just "x" > or "y" separately, to do a decimal log10 instead of the natural log? xy.coords doesn't do any transformation other than setting non-positive values to NA. So your question doe

[R] as.character(seq(-.35,.95,.1))

2007-11-20 Thread Ken Fullish
> as.character(seq(-.25,.95,.1)) [1] "-0.25" "-0.15" "-0.05" "0.05" "0.15" "0.25" "0.35" "0.45" "0.55" "0.65" "0.75" "0.85" "0.95" > as.character(seq(-.35,.95,.1)) [1] "-0.35" "-0.25" "-0.15" "-0.0499" "0.05" [6] "0.15"

[R] Canonical Correlation Analysis

2007-11-20 Thread Animesh Acharjee
Dear Sir/Madam, This is Animesh working on Canonical Correlation Analysis ( CCA ) and I am using CCA package in R. I have a doubt and it may be very basic question. Hope someone will get back to me with answer. I am trying to follow the documentation of CCA but could n

[R] xy.coords and log10

2007-11-20 Thread Alexy Khrabrov
Is there a way to teach xy.coords, when given log="xy", or just "x" or "y" separately, to do a decimal log10 instead of the natural log? Cheers, Alexy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] intercept in multiple regression

2007-11-20 Thread Irene Mantzouni
Hi all! Is it possible to model a multiple regression in which the response becomes zero when one of the two covariates is zero? lm(y~ x1+x2) and y=0 if x1=0. However, when x1=0, y=x2+1(intercept). Does this mean I cannot have a second covariate and intercept or should I eliminate only the

Re: [R] Use and misuse of "update" function for non-models. Any views/recommendations??

2007-11-20 Thread Søren Højsgaard
Thanks, Luke Tierney - the documentation of update was exactly what prompted my question. Yet, I conclude that writing an update.myobject method is OK. Regards Søren Fra: Luke Tierney [mailto:[EMAIL PROTECTED] Sendt: ti 20-11-2007 14:54 Til: Prof Brian Ripl

Re: [R] Friendly way to link R - MySQL and non-(R and Mysql) users ?

2007-11-20 Thread Gabor Grothendieck
Simplest would be to use the select.list() R command: xnames <- select.list(colnames(iris)) For a prettier and more functional approach the gWidgets package provides a layer over a number of lower level packages for creating GUI front ends in R. http://wiener.math.csi.cuny.edu/pmg/gWidgets Other

Re: [R] Trying to get around R

2007-11-20 Thread Loren Engrav
Good morning and thank you One correction please I was not the poster I am [EMAIL PROTECTED] Poster was Epselon <[EMAIL PROTECTED]> What you say is most certainly true. But then the newbie corrections might have the style displayed by Mr. Bolker to both educate and further promote participation.

Re: [R] adding an image to a plot

2007-11-20 Thread jombart
Selon Rajarshi Guha <[EMAIL PROTECTED]>: > Hi, I'm writing code to generate a plot, in which I draw a series of > rectangles. So my code is of the form > > plot.new() > plot.window( ... ) > > draw rectangle > draw rectangle > ... > > Is there a way for me to insert a PNG or PDF graphic at a specif

Re: [R] biplot

2007-11-20 Thread Prof Brian Ripley
On Tue, 20 Nov 2007, S Ellison wrote: > Also check the asp= parameter in plot.default and plot.window; this sets > the aspect ratio so that 1 unit in x is the same physicla length as 1 > unit in y. I don;t know whether it is respeced by your particular > biplot, though. That's not how biplot.defa

[R] Friendly way to link R - MySQL and non-(R and Mysql) users ?

2007-11-20 Thread Ptit_Bleu
Thanks to your help, I managed to link R and a Mysql Database, send queries, plot the results and put everything in a pdf document (with Sweave). My co-workers find the job not bad but they would like to have a friendly interface to send queries and see the graphs (the pdf document is not necessa

Re: [R] reading graph metadata text from a file

2007-11-20 Thread Alexy Khrabrov
I've tried tetxplot() but it fills the whole frame. I could either use mfrow but it would devote unnecessarily large space to the text. In fact I want it in a corner of my current plot, not occupied by the curves. Here's what I ended up with -- it works, but I have to manually move top t

Re: [R] plotting coxph results using survfit() function

2007-11-20 Thread Shoaaib Mehmood
stephen, Thanks for your help. I want to draw a plot which shows separate survival curves for each category of X on the same plot(same set of axes). Your code produces a separate curve for each combination of X and Y but I don't want curves for combinations of X and Y since Y has many levels and a

Re: [R] adding an image to a plot

2007-11-20 Thread Gabor Grothendieck
Check out this thread: http://tolstoy.newcastle.edu.au/R/e2/help/07/04/14273.html On Nov 20, 2007 9:26 AM, Rajarshi Guha <[EMAIL PROTECTED]> wrote: > Hi, I'm writing code to generate a plot, in which I draw a series of > rectangles. So my code is of the form > > plot.new() > plot.window( ... ) >

[R] adding an image to a plot

2007-11-20 Thread Rajarshi Guha
Hi, I'm writing code to generate a plot, in which I draw a series of rectangles. So my code is of the form plot.new() plot.window( ... ) draw rectangle draw rectangle ... Is there a way for me to insert a PNG or PDF graphic at a specific position in the plot (ideally in plot coordinates)? I

Re: [R] How to map clusters to a correlation matrix

2007-11-20 Thread Serguei Kaniovski
To Walter, I am building a model of voting in the EU Council of Ministers. A voting scenario assumes the probabilities of yes votes, possible different for each country, and correlation coefficient between them. The country variables (data) reflect the background characteristics that are releva

[R] p.adjust on matrix of P-values from correlations

2007-11-20 Thread Muenchen, Robert A (Bob)
Hi All, I'm stumped on something that must be trivial. I created a correlation matrix on 4 variables (6 correlations) using Hmisc's rcorr function. I wanted to correct the P-value matrix for the number of tests done, so I ran it through the p.adjust function. That function adjusted for the 12 p-va

Re: [R] Use and misuse of "update" function for non-models. Any views/recommendations??

2007-11-20 Thread Luke Tierney
On Tue, 20 Nov 2007, Prof Brian Ripley wrote: update() is generic, so the recommended approach would be to write a method for your objects. Creating your own function update() in a package would probably not break too much, as namespaces would protect most functions using the generic in stats

Re: [R] plotting confidence intervals of regression line

2007-11-20 Thread Eik Vettorazzi
you can use the newdata statement in the predict function, as in n<-50 x<-sample(40:70,n,rep=T) y<-.7*x+rnorm(n,sd=5) plot(x,y,xlim=c(20,90),ylim=c(0,80)) mylm<-lm(y~x) abline(mylm,col="red") newx<-seq(20,90) prd<-predict(mylm,newdata=data.frame(x=newx),interval = c("confidence"), level = 0.90,ty

[R] How to map clusters to a correlation matrix

2007-11-20 Thread Serguei Kaniovski
Dear All, I have several socio-economic and geographic variables for the 27 EU countries. I would to use these data to derive a correlation matrix between groups of countries (for a different application). I thought of using kmeans to cluster the groups, and then calibrate between group correlat

Re: [R] Use and misuse of "update" function for non-models. Any views/recommendations??

2007-11-20 Thread Prof Brian Ripley
update() is generic, so the recommended approach would be to write a method for your objects. Creating your own function update() in a package would probably not break too much, as namespaces would protect most functions using the generic in stats. But it could be very confusing to users. O

[R] plotting confidence intervals of regression line

2007-11-20 Thread Tim Holland
Hello, I am trying to generate a confidence interval (90 or 95%) of a regression line. This is primarily just for illustration on a scatter plot (i.e. I am trying to make this http://www.ast.cam.ac.uk/~rgm/scratch/statsbook/graphics/anima4.gif). I have been trying to use the predict.lm function,

Re: [R] How to improve a function converting year, day of year, decimal hour into date ?

2007-11-20 Thread Ptit_Bleu
Thank you Gabor for your fast answer (received as I was reading R News 4/1) Ptit Bleu. library(chron) chron(paste("1/1/", year, sep = "")) + julday + hour/24 That produces a chron, i.e. dates/times class datetime. If you want it as a string use format(...above expression...)See the help de

  1   2   >