Re: [R] Significance of slopes

2008-12-09 Thread anna freni sterrantino
Hi Christian, please give always reproducible code, so we can see what have done and give you the best answer. lm function, generally as in this example form lm man page ( ?lm) > trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) >ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.3

[R] controlling axes in plot.cuminc (cmprsk library)

2008-12-09 Thread Amy Krambrink
Dear R-help list members, I am trying to create my own axes when plotting a cumulative incidence curve using the plot.cuminc function in the CMPRSK library. The default x-axis places tick marks and labels at 0, 20, 40, 60, and 80 (my data has an upper limit of 96), whereas I want them at my ow

Re: [R] Transforming a string to a variable's name? help me newbie...

2008-12-09 Thread tsunhin wong
Greg, I found your suggestion very efficient! And I tried testing it, however, it didn't work: ###start of file rm(list=ls()) setwd("/Users/John/Documents/Research/Experiments/expt108/") ##test out 3 files only nms <- c("019-v1-msa1.data","019-v1-msa2.data","019-v1-msa3.data") my.data <- list()

[R] Help with subtitle for Barplot

2008-12-09 Thread Li, Shaorong
<> <> <> I attached the R code, data and plot. I am wondering why I couldn't get subtitle showing up under each plot even though I didn't get any error message. Thanks for help in advance, Shaorong Sample NKa1b_2 NKa1c_2 NKAa3_2 NKAb1_1 Group 1556-0.14928982 -0.146699076-0.022

[R] Polar coordinates - contour plots

2008-12-09 Thread Todor Kondic
Hello, I have data for contour plot which is given in polar coordinates. Is there a straightforward way to plot in polar coordinates in R, or do i need to fiddle with transformations and then to sort the x and y vectors to be in ascending order as required by contour function and relatives? Cheer

Re: [R] Transforming a string to a variable's name? help me newbie...

2008-12-09 Thread tsunhin wong
I did really want to find make the suggestion work... it is going to save my time... I worked on trying to put all dataframes into a list() by: ###start of file rm(list=ls()) setwd("/Users/John/Programs/R") load("Expt108Master2008.Rdata") nms <- ls(pattern=".data") my.data <- list() for(i in nms)

[R] Power calculations where two samples are of unequal size

2008-12-09 Thread Farrel Buchinsky
I have used the function power.t.test() (power calculations for one and two sample t tests) but have noted that it handles the samples as being the same size. How does one handle sample sizes that are different. In other words how does one handle unbalanced designs. Farrel Buchinsky _

Re: [R] French IRC channel and mailing list ?

2008-12-09 Thread Julien Barnier
Hi Baptiste, > In my personal opinion, I see little overall benefit from such an > approach. For one thing, a major strength of the R mailing list is the > large number of very knowledgeable persons. A mailing list with only a > few 10s of users will never provide as good a support as you can find

Re: [R] Polar coordinates - contour plots

2008-12-09 Thread Bert Gunter
I believe the latter for base R, as the standard contour plotting depends on internal (fortran, I think) code that works only for rectangular coordinates.Should be only a few lines of fiddling though (exercise left to reader). Try RSiteSearch("polar coordinates", restr="func") to see what mig

Re: [R] Power calculations where two samples are of unequal size

2008-12-09 Thread Stephan Kolassa
Hi Farrel, I usually simulate in cases like this - pick the effect size and distributions you conjecture, simulate your data 10,000 times and look how often t.test() gets you a significant difference. Good luck, Stephan Farrel Buchinsky schrieb: I have used the function power.t.test() (powe

[R] == operand

2008-12-09 Thread Renny Li
Hi,   I am trying to compare two values using "==" operand, please take a look of the following example (I copied ALL what I did here without deleting any line)   >    bb<-1 > cc<-50 > cc==abs(bb+52) [1] FALSE > C<-53 > C<-53 > c<-53 > cc==abs(bb+52) [1] FALSE      I am expecting to see a

[R] Better way to find distances between points in a set?

2008-12-09 Thread Carl Witthoft
I was playing around a bit to see how I could find the two points in a set of points (or ordered pairs) furthest from each other. Here's what I did: 1) created a Nrow by 2col matrix, so each row contains an x,y coordinate pair. 2) fed the matrix to a nested mapply (cv is my matrix): mapply(

Re: [R] Transforming a string to a variable's name? help me newbie...

2008-12-09 Thread Antonio, Fabio Di Narzo
> names(my.data) gives you the vector of 'names' of the list, which should be a good, compact overview of the list contents. > str(my.data) gives also streamlined information about each component of the list, i.e. also what variables are there (names and types), how many observations, etc. To disse

Re: [R] Transforming a string to a variable's name? help me newbie...

2008-12-09 Thread tsunhin wong
Thank you all! :) Can I "walk through" the my.data structure without knowing the name of particular dataframe in it? Such as: for(i in 1:length(my.data)) myprocess(my.data[i]) ? If it is possible, then this is going to save the work of using paste(). Thanks! On Tue, Dec 9, 2008 at 6:45 PM, Anton

[R] Error: protect () : protection stack overflow

2008-12-09 Thread Bricklemyer, Ross S
I am attempting to create a formula using as.formula for a PLS analysis. I have used the code below successfully, but in a previous R version and with many fewer predictors. Any help getting all of these predictors into one formula would be greatly appreciated. TC.fmla <- as.formula(paste("TC

Re: [R] bayesm package not downloading via any mirror or repository

2008-12-09 Thread ekwaters
OK still no luck, when, as you say it is clear that the package IS available. It really doesn't seem to matter what mirror I use and they can't all be down. I can install other packages such as LearnBayes, VCD etc with no issues, so can't be blocked at my end. My latest output: > install.package

Re: [R] == operand

2008-12-09 Thread hadley wickham
On Tue, Dec 9, 2008 at 5:36 PM, Renny Li <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to compare two values using "==" operand, please take a look of > the following example (I copied ALL what I did here without deleting any line) > >>bb<-1 >> cc<-50 >> cc==abs(bb+52) > [1] FALSE >> C<-53

Re: [R] == operand

2008-12-09 Thread Gustavo Carvalho
Hello, You assigned 53 to c, not cc. Also, take a look at this: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f On Tue, Dec 9, 2008 at 9:36 PM, Renny Li <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to compare two values using "==" operand, p

Re: [R] Power calculations where two samples are of unequal size

2008-12-09 Thread Chuck Cleland
On 12/9/2008 6:32 PM, Farrel Buchinsky wrote: > I have used the function power.t.test() (power calculations for one > and two sample t tests) but have noted that it handles the samples as > being the same size. How does one handle sample sizes that are > different. In other words how does one handl

Re: [R] Error: protect () : protection stack overflow

2008-12-09 Thread Bert Gunter
Apparently the former, as I got the same error in R2.7.1 on Windows. Matbe relevant info(?): $platform [1] "i386-pc-mingw32" $arch [1] "i386" $os [1] "mingw32" $system [1] "i386, mingw32" -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

[R] calculating large factorials

2008-12-09 Thread rfulton
Hi I was wondering if there is a way to compute factorials >170 in R i have a formula including factorials of nearly 1 i know in python and i think c++ there is a big number library is there something like this in R? Thanks - The University of Glasgow, charity number SC004401 __

Re: [R] calculating large factorials

2008-12-09 Thread Gabor Grothendieck
Use lfactorial to calculate log factorial. On Tue, Dec 9, 2008 at 7:55 PM, <[EMAIL PROTECTED]> wrote: > > > Hi > I was wondering if there is a way to compute factorials >170 in R i have a > formula including factorials of nearly 1 i know in python and i think c++ > there is a big number libra

Re: [R] expected variable name error pos 98349 WInBUGS in R

2008-12-09 Thread Anamika Chaudhuri
I did run the same model in WinBUGS, letting WinBUGS generate initials but now it gives me the error 'data value already given to this quantitiy' using a sample dataset and the cursor blinks in the highlighted section. list(NAUSEA=c(1,0,0,0,0,1,1,1,0,1,1,0),SITEID=c(1,1,1,1,1,1,2,2,2,2,2,2), n.sit

[R] exporting rast from R to GRASS

2008-12-09 Thread Thybério Luna Freire
Hi, everybody! i created a imagem by kriging using geoR package. I imported points from GRASS("zn", after converted to geodata "zn_geo"), the border "zn_border" and a raster mask. Then i interpolated the points by kriging and created a raster image. Now, i need export this image back to GRASS to u

[R] subset point data set by distance ranges

2008-12-09 Thread David M Warner
Greetings I'm using R 2.8 with recent (last month) versions of the packages I need to use at present. I'm interested in examining hierarchical spatio-temporal patterns in a data set. The data consist of 94 points (X, Y, UTM coordinates) at which catch rates for a fish were

Re: [R] ARMA

2008-12-09 Thread Gad Abraham
Raphael Saldanha wrote: Hi! Is there any package or function on R to ARMA models (Box & Jenkins, without sazonality and trend) with resources to automatic identification for p and q ? Have a look at auto.arima() from the forecast package http://cran.ms.unimelb.edu.au/web/packages/forecasting/

Re: [R] RCurl::postForm() -- how does one determine what the names are of each form element in an online html form?

2008-12-09 Thread Felix Andrews
2008/12/10 Tony Breyal <[EMAIL PROTECTED]>: > Dear R-Help, > > I am looking into using the Open Calais web service (http:// > sws.clearforest.com/calaisViewer/) for text mining purposes. I would > like to use R to post text into one of the forms on their website. > > In package RCurl, there is a fu

Re: [R] How can I draw bars

2008-12-09 Thread stephen sefick
arrows and I don't remember what package, but I will see if I can remember. On Tue, Dec 9, 2008 at 3:02 PM, Raymond Balise <[EMAIL PROTECTED]> wrote: > I need to make a graphic to show problems on different parts of > chromosomes (think of a graphic showing the number of frayed threads > as colors

Re: [R] R and Scheme

2008-12-09 Thread Stavros Macrakis
Thanks for the various thoughtful replies to my post "R and Scheme", where I wondered what exactly people meant when they said that R semantics were based on Scheme semantics. R clearly has Scheme-like semantics for its function objects, which are first-class objects and correctly implement static

Re: [R] How can I draw bars

2008-12-09 Thread Steven McKinney
Hi Raymond, You might be able to get the plots you want with the 'cytoband' material provided in the Bioconductor package "SNPchip". Check out the SNPchip data set 'cytoband' and the plot function "plotCytoband" for ideas. This material is used e.g. in Bioconductor package "VanillaICE" to add a

Re: [R] exporting rast from R to GRASS

2008-12-09 Thread Dylan Beaudette
On Tue, Dec 9, 2008 at 6:03 PM, Thybério Luna Freire <[EMAIL PROTECTED]> wrote: > Hi, everybody! > i created a imagem by kriging using geoR package. I imported points > from GRASS("zn", after converted to geodata "zn_geo"), the border > "zn_border" and a raster mask. Then i interpolated the points

Re: [R] Better way to find distances between points in a set?

2008-12-09 Thread Charles C. Berry
The 'better way' to do almost anything starts with a reading of the _posting guide_, which reminds you to Do your homework before posting [Reasons whyfor deleted]] * Do help.search("keyword") and apropos("keyword") with different keywords (type thi

Re: [R] subset point data set by distance ranges

2008-12-09 Thread Charles C. Berry
On Tue, 9 Dec 2008, David M Warner wrote: Greetings I'm using R 2.8 with recent (last month) versions of the packages I need to use at present. I'm interested in examining hierarchical spatio-temporal patterns in a data set. The data consist of 94 points (X, Y, UTM coordinates) at

[R] recursive term

2008-12-09 Thread Roslina Zakaria
Hi,   I would like to write a function for this formula: F(a,b,c,z)=1+(ab)/(1!c)+ +(a(a+1)b(b+1))/(2!c(c+1))+ +(a(a+1)(a+2)b(b+1)(b+2))/(3!c(c+1)(c+2))+…   I wrote this function but not sure what is not right:   hypergeo_sum <- function (a,b,c,z,n) { for (i in 1:n)   { aa <- 1+(a*b*z)/c   aa[i] <

Re: [R] R and Scheme

2008-12-09 Thread Johannes Huesing
Stavros Macrakis <[EMAIL PROTECTED]> [Wed, Dec 10, 2008 at 04:59:25AM CET]: > So I conclude that what is really meant by "R semantics are based on Scheme > semantics" is "R has functions as first-class citizens and a correct > implementation of lexical scope, including upwards funarg". > One othe

Re: [R] == operand

2008-12-09 Thread Ben Bolker
Renny Li wrote: > > Hi, >   > I am trying to compare two values using "==" operand, please take a look > of the following example (I copied ALL what I did here without deleting > any line) >   >>    bb<-1 >> cc<-50 >> cc==abs(bb+52) > [1] FALSE >> C<-53 >> C<-53 >> c<-53 >> cc==abs(bb+52) > [1]

Re: [R] R and Scheme

2008-12-09 Thread Peter Dalgaard
Johannes Huesing wrote: Stavros Macrakis <[EMAIL PROTECTED]> [Wed, Dec 10, 2008 at 04:59:25AM CET]: So I conclude that what is really meant by "R semantics are based on Scheme semantics" is "R has functions as first-class citizens and a correct implementation of lexical scope, including upwards

Re: [R] bayesm package not downloading via any mirror or repository

2008-12-09 Thread Prof Brian Ripley
On Tue, 9 Dec 2008, ekwaters wrote: OK still no luck, when, as you say it is clear that the package IS available. It really doesn't seem to matter what mirror I use and they can't all be down. I can install other packages such as LearnBayes, VCD etc with no issues, so can't be blocked at my end

Re: [R] Significance of slopes

2008-12-09 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 09.12.2008 23:21:17: > Hi Christian, > please give always reproducible code, > so we can see what have done > and give you the best answer. > > lm function, generally > as in this example form lm man page ( ?lm) > > > > trt <- c(4.81,4.17,4.41,3.59,5.87,3.83

[R] Odp: problem with Vista

2008-12-09 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 09.12.2008 11:10:49: > Hello, > I want to import a txt table into R but the software give me this message. I > have windows vista. > > > Errore in file(file, "r") : cannot open this connection > Besides: Warning message: > In file(file, "r") : > Â cannot open f

Re: [R] problem with Vista

2008-12-09 Thread Peter Dalgaard
vincenzo landi wrote: Hello, I want to import a txt table into R but the software give me this message. I have windows vista. Errore in file(file, "r") : cannot open this connection Besides: Warning message: In file(file, "r") : Â cannot open file 'C:/Users/Vincenzo/Desktop/prova/prova.txt': N

Re: [R] Logical inconsistency

2008-12-09 Thread Mark Difford
And here one is very much inclined to chirp in and say, "A matchless Wacek strikes again." Regards, and thanks to all for a most entertaining (and enlightening) thread. Wacek Kusnierczyk wrote: > > Patrick Connolly wrote: >> On Mon, 08-Dec-2008 at 02:05AM +0800, Berwin A Turlach wrote: >> >>

[R] Registry problem when loading RMySQL

2008-12-09 Thread Gerald van der Grijn
Hi all, I am exploring the possibility of using R in my meteorological verification project. I have installed R on my Windows (XP) desktop machine and have also installed the RMySQL and verification packages. However, I run into problems when I try to load RMySQL. I get the following error:

<    1   2