Re: [R] Efficient way to compute power of a sparse matrix

2007-11-19 Thread Moshe Olshansky
Just a correction to my previous posting - O(N^2.25) algorithm for multiplying two general NxN matrices was too optimistic! There exists an O(N^a) algorithm with a < 2.4, but the constant multiplying N^a is so big that for N around 1000 it seems that one will be unable to end up with significantly

Re: [R] Trying to get around R

2007-11-19 Thread ecatchpole
Loren, There's a good reason for replying to the list, rather than just to you personally: to let other readers of the list see the response, so that they don't duplicate it. Your original posting certainly looked like homework questions to me. This impression was reinforced by the fact that t

Re: [R] Re ad HTML table

2007-11-19 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 theta wrote: > > f.jamitzky wrote: >> You can use htmlTreeParse and xpathApply from the XML library. >> something like: >> >> xpathApply( htmlTreeParse("http://blabla";, useInt=T), "//td", function(x) >> xmlValue(x)) >> >> should do it. >> > > Than

[R] How is the Gauss-Newton method compared to Levenberg-Marquardt for curve-fitting?

2007-11-19 Thread Ali -
Hi, It seems to me that the most suitable method in R for curve-fitting is the use of nls, which uses a Gauss-Newton (GN) algorithm, while the use of the Levenberg-Marquardt (LM) algorithm does not seem to be very stressed in R. According to this [1] by Ripley, 'Levenberg-Marquardt is hardly c

Re: [R] Trying to get around R

2007-11-19 Thread Loren Engrav
I am a newbie to R and Bio emails and It is clear that newbies make "mistakes", I made several which were pointed out and I am trying to fix them, and as I fix one I make another, in time perhaps I will "know it all", but if it is like surgery, I will make mistakes until I retire But the response

Re: [R] Efficient way to compute power of a sparse matrix

2007-11-19 Thread Moshe Olshansky
Hello Stéphane, Since 20 = 4 + 16 you need 5 matrix multiplications to compute X^20 (2 for X^4, 2 more for X^16 and one more for X^20). If your matrix is NxN, one naive matrix multiplication requires about N^3 operations. In your case N is 900. If it were 1000, 1000^3 is one billion, so 5 matrix m

Re: [R] Plotting Non Numeric Data

2007-11-19 Thread jim holtman
Here is one way to plot your data: # generate 24 cases of 4 letter character strings x <- expand.grid(c("A", "B"), c("C","D"), c("E","F"), c("G","H","I")) x <- apply(x, 1, paste, collapse='') # data to plot y <- factor(sample(x, 200, TRUE)) par(mar=c(5,6,1,1)) plot(seq_along(y), y, yaxt='n', type=

Re: [R] Problems with NA's

2007-11-19 Thread Moshe Olshansky
The problem is that if you do the following: x <- NA then x == NA returns NA (and not TRUE or even FALSE). Use is.na to test for NA (see ?is.na). --- "Thomas L Jones, PhD" <[EMAIL PROTECTED]> wrote: > Difficulty handling NA's: > Assume that I have a numeric vector y. For > simplicity, assume tha

Re: [R] Problems with NA's

2007-11-19 Thread Marc Schwartz
On Mon, 2007-11-19 at 22:18 -0500, 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

[R] Problems with NA's

2007-11-19 Thread Thomas L Jones, PhD
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] != NA){(print ("no")} print ("Leaving NA_test")

Re: [R] sample nth day data in each month

2007-11-19 Thread Gabor Grothendieck
Suggest you read the article in R News 4/1 on dates and times and try this: library(zoo) library(chron) z <- zoo(101:200, seq(chron("1/1/2000"), length = 100)) zz <- z[with(month.day.year(time(z)), day >= 21 & month %% 2 == 1)] zz[!duplicated(as.yearmon(time(zz)))] On Nov 19, 2007 9:57 PM, Ca

Re: [R] sample nth day data in each month

2007-11-19 Thread Carles Fan
many thanks Gabor. Q1: if i want to do with the following 2 conditions, how can i do? condition 1) every n-th day condition 2) every x-month <-x = 1 to 12 Eg: condition 1) every 21-th day condition 2) every 2-month 1st data: 2000-01-21 100 2nd data: 2000-03-21 101 3rd data: 2000-05-21

Re: [R] counting strings of identical values in a matrix

2007-11-19 Thread Marc Schwartz
Moshe, Gabor posted that same solution shortly after my reply on Thursday. I had one of those "head banging" episodes shortly thereafter... :-) Regards, Marc On Mon, 2007-11-19 at 17:46 -0800, Moshe Olshansky wrote: > How about adding an artificial last row containing no > 1's (say a row of z

[R] Help with talking to R from Java (on Window)

2007-11-19 Thread adschai
Hi - I read through RServe page carefully and it turns out that it's not recommended to use RServe on windows. I have different applications that are calling R to do their own things at the same time. So architecture like R(D)COM or RServe is preferred where I can create a dedicated process for

Re: [R] assign if not set; stand-alone R script, source'able too?

2007-11-19 Thread Marc Schwartz
Alexy, In addition to Gabor's reply, you might want to review the following page from the R Wiki: http://wiki.r-project.org/rwiki/doku.php?id=developers:rinterp which covers LittleR by Jeff Horner and Dirk Eddelbuettel and provides shell scripting support for R. HTH, Marc On Mon, 2007-11-19 a

Re: [R] Plotting Non Numeric Data

2007-11-19 Thread Marc Schwartz
On Tue, 2007-11-20 at 00:37 +, Michal Charemza wrote: > Hi, > > Is there a way to plot non numerical data in R? > > Specifically, I have an array, say with 1000 entries, where each entry > is a string of 4 characters (in any order, 24 possibilities in my > case). I would like on the y-ax

Re: [R] assign if not set; stand-alone R script, source'able too?

2007-11-19 Thread Gabor Grothendieck
Here are two solutions: # 1 "%or%" <- function(x, y) if (is.na(x)) y else x NA %or% 1 # 1 3 %or% 1 # 3 # 3 # can omit Negate<- line in R 2.7.0 since its predefined there Negate <- function(f) function(...) ! match.fun(f)(...) Filter(Negate(is.na), c(NA, 1))[1] # 1 Filter(Negate(is.na), c(3, 1))[1

Re: [R] counting strings of identical values in a matrix

2007-11-19 Thread Moshe Olshansky
How about adding an artificial last row containing no 1's (say a row of zeros)? --- Marc Schwartz <[EMAIL PROTECTED]> wrote: > > On Thu, 2007-11-15 at 17:53 +0100, A M Lavezzi > wrote: > > thank you. > > I did not think about the case of overlapping of > > 1's from the end of one column to the

Re: [R] assign if not set; stand-alone R script, source'able too?

2007-11-19 Thread Alexy Khrabrov
Marc -- thanks, very interesting. I was in fact tinkering at a very simple default arguments assignment to a generic command-line R script header: #!/bin/sh # graph a fertility run tail --lines=+4 "$0" | R --vanilla --slave --args $*; exit args <- commandArgs()[-(1:4)] # the krivostroi library

Re: [R] assign if not set

2007-11-19 Thread Marc Schwartz
On Tue, 2007-11-20 at 03:32 +0300, Alexy Khrabrov wrote: > What's the idiom of assigning a default value to a variable if it's > not set? In Ruby one can say > > v ||= default > > -- that's an or-assign, which triggers the assignment only if v is > not set already. Is there an R shorthand?

[R] Plotting Non Numeric Data

2007-11-19 Thread Michal Charemza
Hi, Is there a way to plot non numerical data in R? Specifically, I have an array, say with 1000 entries, where each entry is a string of 4 characters (in any order, 24 possibilities in my case). I would like on the y-axis all the strings that are in the array as labels. The x-axis I would

[R] assign if not set

2007-11-19 Thread Alexy Khrabrov
What's the idiom of assigning a default value to a variable if it's not set? In Ruby one can say v ||= default -- that's an or-assign, which triggers the assignment only if v is not set already. Is there an R shorthand? Cheers, Alexy __ R-help@r

Re: [R] Effective code for 2 vector multiplication?

2007-11-19 Thread Moshe Olshansky
You can use matrix by vector multiplication: m <- as.matrix(POPULATION) beta <- as.numeric(beta.vector) y <- m %*% beta POPULATION <- cbind(POPULATION,y) --- Dimitri Liakhovitski <[EMAIL PROTECTED]> wrote: > Hello! > > I have a data frame POPULATION populated with > numeric values such that > d

Re: [R] mulitmodal distributions

2007-11-19 Thread Bert Gunter
If you can write a density function then you can (usually easily in R) write calculate a (log)likelihood that can be minimized by optim(). Of course, as always, the data and starting values must support the parameterization. I don't know anything about the paper you reference, but as a general com

Re: [R] Effective code for 2 vector multiplication?

2007-11-19 Thread Peter Alspach
Dimitri Why not simply: POPULATION$Y <- as.matrix(POPULATION)%*%beta.vector ? Peter Alspach (VPN 31708) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dimitri > Liakhovitski > Sent: Tuesday, 20 November 2007 12:42 p.m. > To: R-Help List > Sub

[R] Effective code for 2 vector multiplication?

2007-11-19 Thread Dimitri Liakhovitski
Hello! I have a data frame POPULATION populated with numeric values such that dim(POPULATION) are: 100,000 (rows) and 3 (columns). Also, I have a vector beta.vector that has 3 elements (all numeric values). I want to create a new variable Y (a new column) in POPULATION such that for each row of

[R] mulitmodal distributions

2007-11-19 Thread Marion Wittmann
Hello, I see that "mclust" is a pacakge that handles fitting mixtures of normals. Are there any other packages out that that can handle mixtures of gammas or other exponentials? Additionally, are there any packages out there that can fit bimodal distributions without mixtures? i.e., Cobb et a

[R] add points to xyplot() from alternate data frame

2007-11-19 Thread Dylan Beaudette
Hi, I am using xyplot() to produce a mutli-panel plot of logistic regression response curves. I would like to include symbols denoting the original binary response observations, however this data is located in a different dataframe than what xyplot() is using. I am first plotting the smooth, p

Re: [R] Using windows() and jpeg()

2007-11-19 Thread Duncan Murdoch
On 19/11/2007 5:06 PM, Irina Burmenko wrote: > Thank you very much for your help, Duncan. > > I do have another question, unrelated to the first one. I need to plot > points on the graph, but I want points to be letters instead of symbols. > Ideally, I would like to have circles with letters '

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

2007-11-19 Thread Bert Gunter
... But is I understand correctly,this is certainly straightforward without textplot,too... e.g. mylegend <- "Some text...\n Some more text" mytitle <- "This is a title" plot(0:1,0:1, main = mytitle) legend(.2,.2,leg=mylegend, bty="n") Naturally, this could all be "functionized" and the various

Re: [R] Using windows() and jpeg()

2007-11-19 Thread Greg Snow
Using points and pch only allows the plotting of single letters. If you want to plot strings of more than 1 letter use the "text" function in place of points. To get text in circles you can either plot the text and the circles in separate steps, or another possibility (maybe overkill, but lets yo

Re: [R] delete a row in a matrix

2007-11-19 Thread Julian Burgos
Something like this? > a=matrix(1:9, ncol=3) > print(a) [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 > a=a[-2,] > print(a) [,1] [,2] [,3] [1,]147 [2,]369 You can use negative numbers to reference rows and/or columns, and you'l

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

2007-11-19 Thread Greg Snow
You may want to use the textplot function from the gplots package rather than the legend. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On B

Re: [R] Using windows() and jpeg()

2007-11-19 Thread Irina Burmenko
Thank you very much for your help, Duncan. I do have another question, unrelated to the first one. I need to plot points on the graph, but I want points to be letters instead of symbols. Ideally, I would like to have circles with letters 'Rx' inside, for example. Is that possible? If not, i

Re: [R] Using windows() and jpeg()

2007-11-19 Thread Duncan Murdoch
On 19/11/2007 3:09 PM, Irina Burmenko wrote: > Hello, > > I have the following question, which I haven't been able to resolve after > days of trying. I used to save my plots as jpegs using the savePlot command. > However, that seems to result in lost resolution. So now I'm trying to use > th

Re: [R] Exporting a plot with the LaTeX font lmodern

2007-11-19 Thread Paul Smith
On Nov 19, 2007 1:46 AM, Marc Schwartz <[EMAIL PROTECTED]> wrote: > > > I would like to export, as a pdf file, a plot with the LaTeX font > > > lmodern as the font of my graph. Could somebody please help me? > > > > I have tried the following but with no success: > > > > > pdf(file="myplot.pdf",fam

Re: [R] Search for a usable pan manual

2007-11-19 Thread markleeds
>From: Matthias Bindernagel <[EMAIL PROTECTED]> >Date: 2007/11/19 Mon PM 02:11:45 CST >To: r-help@r-project.org >Subject: [R] Search for a usable pan manual Joe Schafer wrote a text on missing data, the title of which escapes me and I can't say if it will be useful for your particular problem. My

Re: [R] Search for a usable pan manual

2007-11-19 Thread markleeds
>From: Matthias Bindernagel <[EMAIL PROTECTED]> >Date: 2007/11/19 Mon PM 02:11:45 CST >To: r-help@r-project.org >Subject: [R] Search for a usable pan manual Joe Schafer wrote a text on missing data, the title of which escapes me and I can't say if it will be useful for your particular problem. My

[R] Using windows() and jpeg()

2007-11-19 Thread Irina Burmenko
Hello, I have the following question, which I haven't been able to resolve after days of trying. I used to save my plots as jpegs using the savePlot command. However, that seems to result in lost resolution. So now I'm trying to use the jpeg( ) function, but am having trouble because it seem

Re: [R] Re ad HTML table

2007-11-19 Thread theta
f.jamitzky wrote: > > For fixed numbers of columns you can use > > data.frame(matrix(data, nrow, ncol)) > > in order to parse the XML data. > > htmlTreeParse should be rather quick, but in case it is too slow you could > use curl for downloading > the data and xmlstarlet for transformation

[R] Search for a usable pan manual

2007-11-19 Thread Matthias Bindernagel
Hello, I'm looking for a more descriptive manual/tutorial/paper for the pan package. The provided manual and example do not contain any useful hints how to specify a model with more than one variable and leaves several questions unanswered. This also applies to the referred paper "Schafer: Impu

[R] biocep project (R for the Web and the Virtual R Workbench)

2007-11-19 Thread Karim Chine
Dear all, I have been writing during last year at the European Bioinformatics Institute a general unified open source solution for R integration. This work is now available via this link: http://www.ebi.ac.uk/microarray-srv/frontendapp/ The different frameworks and tools of the biocep project ar

Re: [R] delete a row in a matrix

2007-11-19 Thread Benilton Carvalho
theMatrix = matrix(1:100, nc=5) theMatrixWithoutRow5 = theMatrix[-5,] b On Nov 19, 2007, at 3:35 PM, Barb, Jennifer (NIH/CIT) [E] wrote: > Can anyone tell me how to delete a row in a matrix? I have searched > around and couldn't find a straightforward way to do this. > > Thanks, any help will

[R] delete a row in a matrix

2007-11-19 Thread Barb, Jennifer (NIH/CIT) [E]
Can anyone tell me how to delete a row in a matrix? I have searched around and couldn't find a straightforward way to do this. Thanks, any help will be greatly appreciated. Jennifer [[alternative HTML version deleted]] __ R-help

Re: [R] Convert from ppp to spp objects

2007-11-19 Thread Rolf Turner
On 20/11/2007, at 9:00 AM, Honey Giroday wrote: > > Hi All! > > As a new useR, I am currently working in R 2.5.1 to produce > Ripley's L (the linear version of Ripley's K) for a spatial point > dataset (originally a ESRI shapefile). I have coerced the data to > a ppp object (because I was

[R] reading graph metadata text from a file

2007-11-19 Thread Alexy Khrabrov
I'd like to produce graphs with titles, axis labels, and legend as parameters read from a separate text file. Moreover, I'd like to use the legend for a short summary of the data -- not necessarily for describing the line colors per se. How do we do this? Cheers, Alexy ___

Re: [R] print matrix content on plot

2007-11-19 Thread Greg Snow
The textplot function in the gplots package may be of help. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Monica Pisica > Sent:

[R] Convert from ppp to spp objects

2007-11-19 Thread Honey Giroday
Hi All! As a new useR, I am currently working in R 2.5.1 to produce Ripley's L (the linear version of Ripley's K) for a spatial point dataset (originally a ESRI shapefile). I have coerced the data to a ppp object (because I was originally using 'kest' in the spstat package to produced Ripley

Re: [R] logrank test

2007-11-19 Thread Terry Therneau
The information below is not nearly enough information to work from. We need to know what the data look like! This could be a feature of the statistical test, the code, or the particular data set you have in hand. Terry Therneau --begin included message --- hie carried out a

Re: [R] sorting factor levels by data frequency of levels

2007-11-19 Thread Greg Snow
?reorder Try: > newstate <- reorder(state,state, length) Or > newstate <- reorder(state,state, function(x) -length(x) ) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From:

Re: [R] analysis of large data set

2007-11-19 Thread Greg Snow
On behalf of those of us trapped in 32-bit windows worlds. Thanks to Brian and the others that work on the windows port of R for the great tool and for pushing the boundaries of microsoft. Know that your efforts are appreciated even if we don't say Thank You often enough. -- Gregory (Greg) L. S

[R] biplot

2007-11-19 Thread Weiwei Shi
Hi, I am wondering how to draw biplot with the same scales on both plots? For example, if the two plots have much different scales, generally the two x-y's are scaled so that the two plots are sitting in the center automatically. How to disable this? Thanks -- Weiwei Shi, Ph.D Research Scienti

Re: [R] Why is model.matrix creating 2 columns for boolean?

2007-11-19 Thread Ross Boylan
On Sat, 2007-11-17 at 09:51 -0800, Ben Bolker wrote: > > > Ross Boylan wrote: > > > > I have a data frame "reading" that includes a logical variable "OLT" > > along with response variable "Reading" and predictor "True" (BOTH are > > numeric variables; it's "True" as in the true value). > > > >

Re: [R] Trying to get around R

2007-11-19 Thread Julian Burgos
Hello Epselon (if that is your name), This sounds like homework questions. From the R-help posting guide: "Basic statistics and classroom homework: R-help is not intended for these." If you have a specific question on R coding, do ask it (and provide reproducible code). But you should not e

Re: [R] alternative to logistic regression

2007-11-19 Thread Greg Snow
Why not try it out for yourself to see how much the predictions change: x <- runif(100, -1, 1) p <- exp(3*x)/(1+exp(3*x)) y <- rbinom(100, 1, p) plot(x,p, xlim=c(-1,1), ylim=c(0,1), col='blue') points(x,y) xx <- seq(-1,1, length=250) lines(xx, exp(3*xx)/(1+exp(3*xx)), col='blue') fit1 <- glm( y

Re: [R] Scaling a column in groups

2007-11-19 Thread Greg Snow
?ave -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of john seers (IFR) > Sent: Friday, November 16, 2007 7:21 AM > To: r-help@r-pr

Re: [R] sequence of vectors

2007-11-19 Thread Gregory Warnes
Well, this is a natural thing to program up using 3 nested 'for', loops. Alternatively, one could use something like: > combn <- function( ..., l=list(...) ) + { + lens <- sapply( args, length) + ncomb <- prod(lens) + retval <- matrix(ncol=length(args), nrow=ncomb) + for(i in 1:leng

Re: [R] ASCII character set and hyphen

2007-11-19 Thread Prof Brian Ripley
On Mon, 19 Nov 2007, Roland Kaiser wrote: > Hi all! > > To add to my previous posting > I want to give some more deatils give a more precise > > I want to print a hyphen to a pdf() or postscript() device. > As the documentaion of postscript says > ASCII Character 45("-") is mapped to a minus sign

Re: [R] Problem in R 2.6.0 for windows ?

2007-11-19 Thread Dieter Menne
Caio Azevedo gmail.com> writes: > When I try to save a plot in a PDF format, using R 2.6.0 for windows, it > appears the following message > > Error: Invalid font type > Warning messages: > 1: font family not found in PostScript font database > 2: font family not found in PostScript font databa

[R] ASCII character set and hyphen

2007-11-19 Thread Roland Kaiser
Hi all! I want to print a hyphen to a pdf() or postscript() device. As the documentaion of postscript says ASCII Character 45("-") is mapped to a minus sign (ASCII Character 95) by default. The advice given is to use "\173" for a hyphen. But, the following code produces a curly brace instead of

[R] it looks like ...

2007-11-19 Thread Jan de Leeuw
in 2007 we will publish seven volumes of JSS (four of them special volumes). Volume 18 Spectroscopy and Chemometrics in R Volume 19 regular Volume 20 Psychometrics in R Volume 21 regular Volume 22 Ecology and Ecological Modeling in R Volume 23 is being started, it is a regular volume, and may n

Re: [R] R and reading matlab compressed files

2007-11-19 Thread Henrik Bengtsson
Hi. On 11/17/07, Prof Leslie Smith <[EMAIL PROTECTED]> wrote: > Is there any way to read these files (standard .mat files, created by > matlab version 7 onwards are compressed)? I know that R.matlab doesn't > read them (it even says in the file MatlabServer.m "Matlab v7 saves > compressed files, w

[R] any measure for curvature

2007-11-19 Thread Wensui Liu
in statistics, is there a measure for curvature? how to detect and quantify the curvature between 2 variales instead of using visualization? thank you so much! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] Trying to get around R

2007-11-19 Thread Charles C. Berry
From the R Posting Guide: Basic statistics and classroom homework: R-help is not intended for these. On Mon, 19 Nov 2007, Epselon wrote: I have three problems I am trying to simulate, that I am having difficulty getting around with. Problem 1. I want to determine the 85

Re: [R] Finding proportion of observations that are outliers from the left tail of the normal distribution

2007-11-19 Thread Charles C. Berry
On Mon, 19 Nov 2007, Thomas Fr??jd wrote: Hi fellow users I have a new R problem i am hoping to get some pointers on. I have a dataset that is approximately normally distributed but with a fat left tail. I am interested in a good measurement on how much fatter the left tail is than can be expec

[R] Problem in R 2.6.0 for windows ?

2007-11-19 Thread Caio Azevedo
Hi all, When I try to save a plot in a PDF format, using R 2.6.0 for windows, it appears the following message Error: Invalid font type Warning messages: 1: font family not found in PostScript font database 2: font family not found in PostScript font database However, when I use the version 2.

[R] ASCII character set and hyphen

2007-11-19 Thread Roland Kaiser
Hi all! To add to my previous posting I want to give some more deatils give a more precise I want to print a hyphen to a pdf() or postscript() device. As the documentaion of postscript says ASCII Character 45("-") is mapped to a minus sign (ASCII Character 95) by default. The advice given is to

[R] Trying to get around R

2007-11-19 Thread Epselon
I have three problems I am trying to simulate, that I am having difficulty getting around with. Problem 1. I want to determine the 85 percentile (the x value for which the sum of probabilities becomes 0.85) of the following distributions (two binomials and a Poisson with rate Lmbda= np of the tw

[R] FW: Editorial in Notices of the AMS: Open Source Mathematical Software

2007-11-19 Thread Izmirlian, Grant (NIH/NCI) [E]
Dear Marc: Thanks for pointing this out to me. Here is my reply, just sent. Hopefully the R-core, Bioconductor Core and all afficionados aren't too offended by it, and hopefully it gets published. [EMAIL P

[R] R code for L-moment digram

2007-11-19 Thread amna khan
Dear Sir I am getting errors in using following R code for L-moment ratio diagram Help in this regard > "plotlmrdia" <- + function(lmr, + nopoints=FALSE, + nolines=FALSE, + nolimits=FALSE, + nogev=FALSE, + noglo=FALSE, + nogpa=FALSE, + nope3

[R] snow, MPI, comm

2007-11-19 Thread Markus Schmidberger
Hello, one more change: In stopCluster.spawnedMPIcluster the comm variable should be read out the input variable c1 Best Markus -- Dipl.-Tech. Math. Markus Schmidberger Ludwig-Maximilians-Universität München IBE - Institut für medizinische Informationsverarbeitung, Biometrie und Epidemiologie

Re: [R] OT: good code snippet manager

2007-11-19 Thread Wensui Liu
i've used tinnR before but am not sure how to use it as code snippet manager. any insight? On Nov 17, 2007 1:45 AM, Denver XU <[EMAIL PROTECTED]> wrote: > Tinn-R > > > > 2007/11/17, Wensui Liu <[EMAIL PROTECTED]>: > > Might anyone recommend a good code snippet manager to me? > > I really appreciat

Re: [R] Date and lattice

2007-11-19 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 19.11.2007 15:38:26: > Petr PIKAL precheza.cz> writes: > > > > > I just encountered a strange behaviour trying to plot lattice xyplot with > > dates on x axis > > > > xyplot(rnorm(10)~seq(as.Date("2000/1/1"), by="month", > > length=10)|sample(1:2, 10, replace=T

[R] snow, MPI, comm

2007-11-19 Thread Markus Schmidberger
Hello R Users, Hello Luke, in makeMPICluster (library snow) you set a explicit variable comm <- 1 Therefore using snow, it is not possible to start two (or more) different MPI Clusters from one R session. Can you put comm and intercomm to the default cluster options? Best regards Markus -- Di

Re: [R] sequence of vectors

2007-11-19 Thread ONKELINX, Thierry
expand.grid() is what you are looking for. expand.grid(x1, x2, x3) HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kw

Re: [R] ks.test

2007-11-19 Thread John Kane
Perhaps http://finzi.psych.upenn.edu/R/Rhelp02a/archive/91278.html --- elyakhlifi mustapha <[EMAIL PROTECTED]> wrote: > Hello, > I want to do a normality test to know if "donnees" > is defined as a normal distribution. > To do that I can use the ks.test() function but I > can't understand the resu

[R] print matrix content on plot

2007-11-19 Thread Monica Pisica
Hi, I saved as a matrix a summary of a PCA analysis and I've used barplot to plot the PCA variances. I would like to print on the same graphic the values of my matrix m1 - in other words the summary of my PCA analysis. I can do it very painstaking with text for each row and make sure that eve

Re: [R] sequence of vectors

2007-11-19 Thread Dimitris Rizopoulos
try: expand.grid(x1, x2, x3) 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:

[R] hypen in pdf

2007-11-19 Thread Roland Kaiser
Hi all! I consulted the help pages for postscript(). I noticed the execption for the "-" sign which is mapped to a minus glyph. How can I define a textstring that contains a hyphen (a short dash) and is applicable with strwidth(). Further I want to print it with postscript() Thanks for any a

Re: [R] sequence of vectors

2007-11-19 Thread John Kane
?expand.grid should do what you want. --- Marc Bernard <[EMAIL PROTECTED]> wrote: > Dear All, > > I wonder if there is any R function to generate a > sequence of vectors from existing ones. For example: > x 1<- c(1,2,3) > x2 <- c(4,5) > x3 <- c(6,7,8) > > The desired output is

Re: [R] All nonnegative integer solution

2007-11-19 Thread Peter Dalgaard
Robin Hankin wrote: > Hello Amin > > The partitions library does this. > > If N=4 and k=3: > > > library(partitions) > > blockparts(rep(4,3),4) > > [1,] 4 3 2 1 0 3 2 1 0 2 1 0 1 0 0 > [2,] 0 1 2 3 4 0 1 2 3 0 1 2 0 1 0 > [3,] 0 0 0 0 0 1 1 1 1 2 2 2 3 3 4 > > > > The solutions are enumerated in

[R] sequence of vectors

2007-11-19 Thread Marc Bernard
Dear All, I wonder if there is any R function to generate a sequence of vectors from existing ones. For example: x 1<- c(1,2,3) x2 <- c(4,5) x3 <- c(6,7,8) The desired output is a list of all 3*2*3 = 18 possible combinations of elements of x1,x2 and x3. One element for example i

[R] Finding proportion of observations that are outliers from the left tail of the normal distribution

2007-11-19 Thread Thomas Frööjd
Hi fellow users I have a new R problem i am hoping to get some pointers on. I have a dataset that is approximately normally distributed but with a fat left tail. I am interested in a good measurement on how much fatter the left tail is than can be expected from a normal distribution. One thing I'l

Re: [R] Date and lattice

2007-11-19 Thread Dieter Menne
Petr PIKAL precheza.cz> writes: > > I just encountered a strange behaviour trying to plot lattice xyplot with > dates on x axis > > xyplot(rnorm(10)~seq(as.Date("2000/1/1"), by="month", > length=10)|sample(1:2, 10, replace=T)) > > Warning message: > is.na() applied to non-(list or vector) i

Re: [R] spatial overlap of datasets

2007-11-19 Thread Barry Rowlingson
Barry Rowlingson wrote: > If any of the points of A fall inside B or vice versa then the convex > hulls overlap. Pah, I'm wrong. View this with a fixed-width font: 21 2 11 21 2 convex hull of 1 and 2 overlap, yet no points of either are inside the oth

Re: [R] All nonnegative integer solution

2007-11-19 Thread Robin Hankin
Hello Amin The partitions library does this. If N=4 and k=3: > library(partitions) > blockparts(rep(4,3),4) [1,] 4 3 2 1 0 3 2 1 0 2 1 0 1 0 0 [2,] 0 1 2 3 4 0 1 2 3 0 1 2 0 1 0 [3,] 0 0 0 0 0 1 1 1 1 2 2 2 3 3 4 > The solutions are enumerated in the columns. HTH rksh On 19 Nov 2007

[R] All nonnegative integer solution

2007-11-19 Thread aminzoll
Dear all, Is there any method in R to find all possible nonnegative integer solutions to the linear equation with unit coefficients as follow: X1+X2+...+Xk=N Thank you, Amin Zollanvari __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] spatial overlap of datasets

2007-11-19 Thread Barry Rowlingson
uimbpv wrote: > Hi, > > I have two datasets for which I have used cmdscale (to scale them to > for example 6 dimensions) and then I got their convex hulls. I need to > check if the two convex hulls/areas enclosed by these overlap - would > I be able to do that in R? > Let A and B be the sets of p

Re: [R] Extracting only one part of an string

2007-11-19 Thread Gabor Grothendieck
Just replace the minus and everything after it with an empty string: sub("-.*", "", Names) On Nov 19, 2007 2:14 AM, Tom.O <[EMAIL PROTECTED]> wrote: > > Hi > I wonder if there's a smarter way to do this procedure. > > I have a vector of filenames wher I only am interested in the first part of

[R] spatial overlap of datasets

2007-11-19 Thread uimbpv
Hi, I have two datasets for which I have used cmdscale (to scale them to for example 6 dimensions) and then I got their convex hulls. I need to check if the two convex hulls/areas enclosed by these overlap - would I be able to do that in R? Any ideas are appreciated! Thanks.

[R] Date and lattice

2007-11-19 Thread Petr PIKAL
Dear all I just encountered a strange behaviour trying to plot lattice xyplot with dates on x axis xyplot(rnorm(10)~seq(as.Date("2000/1/1"), by="month", length=10)|sample(1:2, 10, replace=T)) Warning message: is.na() applied to non-(list or vector) in: is.na(x) and no points were plotted. I

Re: [R] defining error families in lme?!

2007-11-19 Thread Ben Bolker
Tonker wrote: > > Hi > I am trying to run an lme on count data. > > lme (fixed = lognobees ~ round + spray + dist + fenconcpoint + > uncolt200mbuffer + daysafterspray + round:spray + round:fenconcpoint + > spray:fenconcpoint + spray:uncolt200mbuffer + dist:uncolt200mbuffer + > uncolt200mbuffe

[R] Using density() and turnpoint to Identify maxima in data

2007-11-19 Thread Rainer M. Krug
Hi I have a large dataset which follows a multimodal distribution. And I would like to identify the maxima. As the data is obtained from a stochastic simulation, not all maxima in the data are "real maxima of the dirstribution" but rather small random fluctuations. Unfortunately, it is not pos

Re: [R] How do I import packages with the package I've built?

2007-11-19 Thread Nutter, Benjamin
So if I understand you correctly, if I include in my namespace file the commandimportFrom(MASS, stepAIC), whenever stepAIC is called from my package, it will still run even if I haven't explicitly imported the MASS package? Or if I use the command import(survival) then the functions i

Re: [R] building packages: hhc.exe not found using xp

2007-11-19 Thread Prof Brian Ripley
On Mon, 19 Nov 2007, Nicodemus, Kristin (NIH/NIMH) [C] wrote: > Hello, > > Apologies in advance if this should be in R-devel, not Rhelp. I did > read through the R-devel thread started by Gabor Grothendieck in > September of this year - I am getting the exact same error using a new > computer

[R] building packages: hhc.exe not found using xp

2007-11-19 Thread Nicodemus, Kristin (NIH/NIMH) [C]
Hello, Apologies in advance if this should be in R-devel, not Rhelp. I did read through the R-devel thread started by Gabor Grothendieck in September of this year - I am getting the exact same error using a new computer that has XP installed, not vista, complaining that the file hhc.exe is no

Re: [R] using two different matrix : how to do t.test

2007-11-19 Thread Henrique Dallazuanna
Perhaps you can try: In two matrix 3 x 3(see 'dim' argument): apply(array(data=c(mat1, mat2), dim=c(3,3,2)), 2, function(x)t.test(x[,1], x[,2])$p.value) On 19/11/2007, mogra <[EMAIL PROTECTED]> wrote: > > I have two matrix with same dimensions. I want to do t.test using each column > from 2 diff

Re: [R] Editorial in Notices of the AMS: Open Source Mathematical Software

2007-11-19 Thread Gorden T Jemwa
This issue is also discussed in depth in the following article available at http://jmlr.csail.mit.edu/papers/v8/sonnenburg07a.html > > For those interested, while scanning /. tonight, I came across a posting > which referred to a new editorial in the November 2007 Notices of the > American Ma

[R] ave and levels

2007-11-19 Thread Patrick Hausmann
Dear list, I want to calculate the standard deviation using 'ave' on two different DFs. In the first DF M1 has only 1 level: > str(x) 'data.frame': 18 obs. of 3 variables: $ M1: Factor w/ 1 level "A03": 1 1 1 1 ... $ M2: num 2.76 2.93 3.06 3.07 3.12 ... $ M3: Factor w/ 2 levels "Ausgew

Re: [R] many zeroes in rgamma ... what's going on?

2007-11-19 Thread Peter Dalgaard
Prof Brian Ripley wrote: > On Sun, 18 Nov 2007, Gregory Gentlemen wrote: > >> Dear Dr. Dalgaard, >> >> Thank you for your insight! In fact, I did read the example >> documentation, however, it pretty much told me the same thing that my >> little simulation did: there is ALOT of point mass at zero.

  1   2   >