[R] How can i inhibit this work Please select a CRAN mirror for use in this session ?

2007-08-25 Thread zhijie zhang
Dear Rusers, When i start R, there always the following work to do first, how should i cancel it? *--- Please select a CRAN mirror for use in this session ---* I don't know why it does so, maybe i have done something unintentionally. Thanks. -- With Kind Regards, oooO:

Re: [R] How can i inhibit this work Please select a CRAN mirror for use in this session ?

2007-08-25 Thread Prof Brian Ripley
On Sat, 25 Aug 2007, zhijie zhang wrote: Dear Rusers, When i start R, there always the following work to do first, how should i cancel it? *--- Please select a CRAN mirror for use in this session ---* I don't know why it does so, maybe i have done something unintentionally. You certainly

[R] Extracting a range of elements from a vector

2007-08-25 Thread Otis Laws
Dear R users I am R newbie creating a function that implements the poker test to test pseudo random bit generators. Iam reading the bits from a text file (1 bit per line), which causes each bit to be stored in an element of a numeric vector. What Iam trying to do is to extract a block of bits

Re: [R] Extracting a range of elements from a vector

2007-08-25 Thread Gabor Grothendieck
See ?embed On 8/25/07, Otis Laws [EMAIL PROTECTED] wrote: Dear R users I am R newbie creating a function that implements the poker test to test pseudo random bit generators. Iam reading the bits from a text file (1 bit per line), which causes each bit to be stored in an element of a

[R] How to provide argument when opening RGui from an external application

2007-08-25 Thread Sébastien
Dear R-users, I have written a small application (in visual basic) that automatically generate some R scripts. I would like to execute these scripts when my application is being closed. My problem is that I don't know how to pass the 'source(c:/.../myscript.r)' instruction when I

Re: [R] How to provide argument when opening RGui from an external application

2007-08-25 Thread Prof Brian Ripley
Look into Rscript.exe (on Windows), which is a flexible way to run scripts. Neither using a GUI nor using source() are recommended. On Fri, 24 Aug 2007, Sébastien wrote: Dear R-users, I have written a small application (in visual basic) that automatically generate some R scripts. I would

[R] efficient way to compute a probability distribution?

2007-08-25 Thread Naxerova, Kamila
Hello! I have a piece of slow code and I am wondering if I am missing some obvious way to make it faster -- or if there is some predefined function I should be using instead. I have a list (ranks), for which I would like to compute the probability of a bunch of values (dereg) being contained in

Re: [R] efficient way to compute a probability distribution?

2007-08-25 Thread Antonio, Fabio Di Narzo
prob - function(x,ranks,dereg) mean(dereg %in% ranks[seq_len(x)]) 2007/8/25, Naxerova, Kamila [EMAIL PROTECTED]: Hello! I have a piece of slow code and I am wondering if I am missing some obvious way to make it faster -- or if there is some predefined function I should be using instead.

[R] fill circles

2007-08-25 Thread Cristian cristian
Hi all, I'm an R newbie, I did this script to create a scatterplot using the tree matrix from datasets package: library('datasets') with(trees, { plot(Height, Volume, pch=3, xlab=Height, ylab=Volume) symbols(Height, Volume, circles=Girth/12, fg=grey, inches=FALSE, add=FALSE) } ) I'd like to use

Re: [R] fill circles

2007-08-25 Thread jim holtman
Here is a function that will generate a color sequence for an input vector, You can specify the colors to use, the range and the number of color steps: # specify the colors and the number of increments you want for a specified # range. It will return the colors for the input vector # specify

Re: [R] How to shade vertical bands in a graph?

2007-08-25 Thread del pes
Thank you all for your answers, the rect function with seq (to do regular rectangles) worked perfectly fakedat-0.985+rnorm(80)/100 plot(fakedat,main=My Striped Plot,type=n) rect(seq(5,75,by=10),par(usr)[3],seq(10,80,by=10),par(usr)[4], col=yellow) points(fakedat,type=b) abline(h=0.98) Very

Re: [R] perception of graphical data

2007-08-25 Thread Henric Nilsson (Public)
Den 2007-08-25 00:42, hadley wickham skrev: Hi Richard, I apologize that this is off-topic. I am seeking information on perception of graphical data, in an effort to improve the plots I produce. Would anyone point me to literature reviews in this area? (Or keywords to try on google?) Is

Re: [R] Variable Importance - Random Forest

2007-08-25 Thread Henric Nilsson (Public)
Den 2007-08-24 21:13, Mathe, Ewy (NIH/NCI) [F] skrev: Hello, I am trying to explore the use of random forests for classification and am certain about the interpretation of the importance measurements. In case you haven't already done so, you probably want to read

[R] Character position command

2007-08-25 Thread Mitchell Hoffman
This is a very simple question, so I apologize I couldn't find it online: I want to shorten the string 'apples.pears' to 'apples'. string='apples.pears' string1=substr(string,0,x) For x above, I would like to have a command like charAt(string,.), i.e. the position of the period in the word, but

Re: [R] Character position command

2007-08-25 Thread Gabor Grothendieck
See ?regexpr to get the position; however, using sub we could remove the dot and everything after it in one go. See ?regexp and ?sub . Also there are some links to info on regular expressions in the Links box on this page: http://gsubfn.googlecode.com n - regexpr(., apples.pears, fixed = TRUE)

[R] How can I interpret this test hypothesis test

2007-08-25 Thread Lord Tyranus
Hello wizards, First of all, I'm a physicist and therefore I'm not much used to use statistics. So, please forgive me if this is a FAQ or stupid, but I failed to find the answer by myself. I have used runs.test (Package tseries) for computes the runs test for randomness , but I get this result:

Re: [R] Character position command

2007-08-25 Thread Prof Brian Ripley
On Sat, 25 Aug 2007, Mitchell Hoffman wrote: This is a very simple question, so I apologize I couldn't find it online: I want to shorten the string 'apples.pears' to 'apples'. string='apples.pears' string1=substr(string,0,x) For x above, I would like to have a command like