[R] How to set the parameters in Trellis Graphics (by Lattice package)

2008-07-29 Thread G.H. Zuo
Dear R users I plot the trellis graphics by using the lattice package. Everything is OK. Now, I want set some parameters of the trellis graphics. 1. The tick label site. By default, only two tick labels had been output in x-axis of my plot. I want output four or five tick labels. In the tradi

Re: [R] product of successive rows

2008-07-29 Thread Moshe Olshansky
Assuming that the number of rows is even and that your matrix is A, element-wise product of pairs of rows can be calculated as A[seq(1,nrow(A),by=2),]*A{seq(2,nrow(A),by=2),] --- On Mon, 28/7/08, rcoder <[EMAIL PROTECTED]> wrote: > From: rcoder <[EMAIL PROTECTED]> > Subject: [R] product of su

Re: [R] Help interpreting density().

2008-07-29 Thread rkevinburton
OK. Thank you for pointing out my mistake. I still have my original question. How does the output relate to estimating the parameters of a given density? I read that for a gausian kernal: bw.nrd0 implements a rule-of-thumb for choosing the bandwidth of a Gaussian kernel density estimator. It de

Re: [R] Help interpreting density().

2008-07-29 Thread rkevinburton
Sorry, poor example. I started with normal deviates and jumped without thinking to Poisson. The main crux of the question is how does the output of density relate to the parameters that describe some of the standard distributions (mean and std for normal, lambda for Poisson, n and p for Binomial

Re: [R] Help interpreting density().

2008-07-29 Thread Mark Difford
Hi Kevin, >> I still have my original question. How does the output relate to >> estimating the parameters >> of a given density? I read that for a gausian kernal: This isn't the place for such questions: you need to do some _basic_ reading on the subject so that you begin to understand somethi

Re: [R] Help interpreting density().

2008-07-29 Thread rkevinburton
Sorry I tried WikiPedia and only found: Wikipedia does not have an article with this exact name. I will try to find some other sources of information. Kevin Mark Difford <[EMAIL PROTECTED]> wrote: > Hi Kevin, >> I still have my original question. How does the output relate to >> estimat

Re: [R] Help interpreting density().

2008-07-29 Thread Mark Difford
Hi Kevin, Clicking on the link I sent gets me there (?), though things are pretty slow at the moment. Perhaps try this related link, and from it get back to the first one: http://en.wikipedia.org/wiki/Density_estimation You can also get to this via histogram, so search for that in Wiki, and the

Re: [R] how to add notes to the graph?

2008-07-29 Thread Jim Lemon
On Mon, 2008-07-28 at 06:32 -0700, rlearner309 wrote: > Hi, > I have a simple graph: > x <- c(1,2,3) > plot(x, pch=16,type="b") > > I would like to add some notes just beside these 3 dots, and the notes are > stored in a vector: > > a <- c(12,54,84) > > So the result will be: there should be

[R] Problem reading a particular file with read.spss()

2008-07-29 Thread Chuck Cleland
Hi All: I have a seemingly typical SPSS data file with 219 rows and 486 variables. When I attempt to read this file into R with read.spss() in the foreign package, I consistently get a "crash". This is the sequence of events: > library(foreign) > sessionInfo() R version 2.7.1 Patched (200

Re: [R] Is there way to multiple plots on gap.plot?

2008-07-29 Thread Jim Lemon
On Mon, 2008-07-28 at 12:15 -0700, Arthur Roberts wrote: > Hi, all, > > Does anyone now of a way to put multiple plots on gap.plot? > > Much appreciated, Hi Art, You must have read my mind. In solving the problem you had with gap.plot, I considered including an "add" argument that would allow th

[R] keywords

2008-07-29 Thread Edna Bell
Hi R Gurus! When you build a package, you need to put in keywords in the Rd files. Where would you find the list of keywords, please? TIA, Edna Bell __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

Re: [R] list

2008-07-29 Thread jim holtman
Is this what you are after: this comes from the example of wilcox.test and shows the structure and how to reference the p-value: > z <- wilcox.test(x, y, paired = TRUE, alternative = "greater") > str(z) List of 7 $ statistic : Named num 40 ..- attr(*, "names")= chr "V" $ parameter : NULL $

[R] Bug in sd() and var() in handling vectors of NA (R version 2.7.1)?

2008-07-29 Thread Marisa Laetitia
In the previous versions of R (2.6.1), when a vector of NA was given to the functions 'sd' or 'var' with parameter na.rm = TRUE, it used to return NA. Now (2.7.1) it returns an ERROR : Example in 2.6.1: > sd(c(NA, NA, NA, NA), na.rm = TRUE) [1] NA Example in 2.7.1: > sd(c(NA, NA, NA,

Re: [R] Problem reading a particular file with read.spss()

2008-07-29 Thread Prof Brian Ripley
It works for me, on Windows with that version of foreign. I also tried under Linux with valgrind, and nothing untoward was reported. The warnings are Warning messages: 1: In read.spss("mySPSSfile.sav") : mySPSSfile.sav: File-indicated character representation code (1252) looks like a Windo

[R] max

2008-07-29 Thread Paul Adams
Hello everyone, I have a vector of p-values and I am trying to find the max for the vector and add it to a list.I am using a loop to loop through 50 times.I have used the following code but it does not pick out the max and add to the list.Any help would be appreciated.   w<-c(v[[1]][3],v[[2]][3]

[R] FW: Installing BRugs

2008-07-29 Thread BXC (Bendix Carstensen)
A funny thing happened when I wanted a student of mine to install Brugs. Using the InstallPackages in the windows version, firts gives an erro, but trying again works flawlessly. R version is 2.7.0 on WinXP. Any explanation? Bendix Carstensen __ Bend

Re: [R] FW: Installing BRugs

2008-07-29 Thread Uwe Ligges
BXC (Bendix Carstensen) wrote: A funny thing happened when I wanted a student of mine to install Brugs. Using the InstallPackages in the windows version, firts gives an erro, but trying again works flawlessly. R version is 2.7.0 on WinXP. Any explanation? No, particularly if it worked the

[R] mac install no font found problem in quartz display

2008-07-29 Thread Zhesi He
Dear list, I was attempted to install 2.7.1 in my mac only recently because of the fantastic quartz display support. I had no problem in building from source. But after installation, I always got font warnings as following when using quartz: Warning messages: 1: In axis(side = side, at = a

Re: [R] product of successive rows

2008-07-29 Thread Jorge Ivan Velez
Hi rcoder, Assuming that the number of rows of your matrix x is even, try also: x <- matrix(1:72,12) apply(x,2, tapply, rep(1:(nrow(x)/2),each=2),prod) # or using a function which argument "x" is your matrix prod.mat=function(x) { k=nrow(x) g=rep(1:(k/2),each=2) apply(x,2, tapply, g,prod) } pr

[R] stringdot ?

2008-07-29 Thread renata.camargo05
Dear all, I am using kernlab package in R, and I have amino acid sequences with different lenghts as input for a SVM and I need to go through this sequences using windows (sliding or fixed) of size X. Does anyone has any suggestions about which function I should use? I thought I could use strin

[R] optim fails when using arima

2008-07-29 Thread MAIDER MATEOS DEL PINO
Hi all, I´m using the arima() function to study a time series but it gives me the following error: Error en optim(init[mask], armafn, method = "BFGS", hessian = TRUE, control = optim.control, : non-finite finite-difference value [3] I know that I can change the method of the arima() t

[R] 'for' loop, two variables

2008-07-29 Thread Oehler, Friderike (AGPP)
Dear Rusers, I am still an unexperienced builder of functions and loops, so my question is very basic: Is it possible to introduce a second variable (j) into my loop. To examplify: # This works fine: fn <- function (x) {if (x>46 & x<52) 1 else 0} res <-NULL for (i in 40:60) res <-c(res,fn(i))

Re: [R] Is there way to multiple plots on gap.plot?

2008-07-29 Thread Jim Lemon
Hi Art, Ignore the last email, I realized that I had already written the "add" bit and it will be in plotrix 2.4-5. As far as I can see, both the "type" and "xlim" problems are solved. Jim __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

Re: [R] 'for' loop, two variables

2008-07-29 Thread Duncan Murdoch
On 7/29/2008 7:55 AM, Oehler, Friderike (AGPP) wrote: Dear Rusers, I am still an unexperienced builder of functions and loops, so my question is very basic: Is it possible to introduce a second variable (j) into my loop. To examplify: # This works fine: fn <- function (x) {if (x>46 & x<52) 1 els

Re: [R] 'for' loop, two variables

2008-07-29 Thread ONKELINX, Thierry
Dear Frederike, #Both your functions are vectorized. So you don't need loops. Working with vectorized functions is much faster than looping. fn <- function (x) { ifelse(x>46 & x<52, 1, 0) } res <- fn(40:60) fn <- function (x,y) { ifelse(x>46 & x<52 & y<12, 1, 0) } datagrid <- exp

Re: [R] 'for' loop, two variables

2008-07-29 Thread Benno Pütz
On 29.Jul.2008, at 14:13, ONKELINX, Thierry wrote: Dear Frederike, #Both your functions are vectorized. So you don't need loops. Working with vectorized functions is much faster than looping. fn <- function (x,y) { ifelse(x>46 & x<52 & y<12, 1, 0) } datagrid <- expand.grid(i = 40:60, j = 0

Re: [R] FW: Installing BRugs

2008-07-29 Thread Prof Brian Ripley
On Tue, 29 Jul 2008, BXC (Bendix Carstensen) wrote: A funny thing happened when I wanted a student of mine to install Brugs. Using the InstallPackages in the windows version, firts gives an erro, but trying again works flawlessly. There was a problem with the http connection. It happens

Re: [R] Bug in sd() and var() in handling vectors of NA (R version 2.7.1)?

2008-07-29 Thread Prof Brian Ripley
There was a bug in 2.6.1 which has since been corrected: there is no need to report corrected bugs in obsolete versions. Two different ways to compute the sd of a zero-length vector gave different answers. This is covered by the following NEWS item for 2.7.0 (version from R-patched) o

[R] Panel of pie charts

2008-07-29 Thread Amin Momin
Hi , I am looking to making a panel of pie charts fo some of my dritribution data . I was wondering if there is a way in any R package to write a small script to do so. Thanks, Amin [[alternative HTML version deleted]] __ R-help@r-proj

Re: [R] Negative Binomial Regression

2008-07-29 Thread Ben Bolker
jcarmichael gmail.com> writes: > > > Hello. > > I am attempting to duplicate a negative binomial regression in R. SAS uses > generalized estimating equations for model fitting in the GENMOD procedure. > > proc genmod data=mydata (where=(gender='F')); > by agegroup; > class id gender type; >

Re: [R] How to set the parameters in Trellis Graphics (by Lattice package)

2008-07-29 Thread Felix Andrews
On Tue, Jul 29, 2008 at 5:37 PM, G.H. Zuo <[EMAIL PROTECTED]> wrote: > Dear R users > > I plot the trellis graphics by using the lattice package. Everything is > OK. Now, I want set > some parameters of the trellis graphics. > > 1. The tick label site. By default, only two tick labels had been o

[R] combining zoo series with an overlapping index?

2008-07-29 Thread stephen sefick
day<-structure(c(7.7, 7.7, 7.7, 7.7, 7.7, 7.71, 7.7, 7.71, 7.71, 7.7, 7.7, 7.7, 7.7, 7.69, 7.68, 7.68, 7.67, 7.67, 7.67, 7.66, 7.65, 7.65, 7.65, 7.64, 7.64, 7.63, 7.63, 7.63, 7.62, 7.62, 7.62, 7.62, 7.63, 7.63, 7.63, 7.63, 7.63, 7.64, 7.64, 7.65, 7.65, 7.65, 7.66, 7.66, 7.67, 7.67, 7.67, 7.68, 7.68

Re: [R] keywords

2008-07-29 Thread Charilaos Skiadas
On Jul 29, 2008, at 5:24 AM, Edna Bell wrote: Hi R Gurus! When you build a package, you need to put in keywords in the Rd files. Where would you find the list of keywords, please? Simplest way is to google for "r keywords". First hit is: http://www.stat.ucl.ac.be/ISdidactique/Rhelp/doc/keyw

Re: [R] combining zoo series with an overlapping index?

2008-07-29 Thread Gabor Grothendieck
Try: window(d, time(lin)) <- coredata(lin) On Tue, Jul 29, 2008 at 9:01 AM, stephen sefick <[EMAIL PROTECTED]> wrote: > day<-structure(c(7.7, 7.7, 7.7, 7.7, 7.7, 7.71, 7.7, 7.71, 7.71, 7.7, > 7.7, 7.7, 7.7, 7.69, 7.68, 7.68, 7.67, 7.67, 7.67, 7.66, 7.65, > 7.65, 7.65, 7.64, 7.64, 7.63, 7.63, 7.63

Re: [R] Panel of pie charts

2008-07-29 Thread John Kane
Have a look at mfcol in ?par. --- On Tue, 7/29/08, Amin Momin <[EMAIL PROTECTED]> wrote: > From: Amin Momin <[EMAIL PROTECTED]> > Subject: [R] Panel of pie charts > To: r-help@r-project.org > Received: Tuesday, July 29, 2008, 7:34 AM > Hi , > I am looking to making a panel of pie charts fo som

Re: [R] combining zoo series with an overlapping index?

2008-07-29 Thread stephen sefick
when I plot this it gives me the coredata(lin) (Ithink). I would like d<- c(day[1:17,], lin, day[84:96,]) to be the result On Tue, Jul 29, 2008 at 9:18 AM, Gabor Grothendieck <[EMAIL PROTECTED] > wrote: > Try: > > window(d, time(lin)) <- coredata(lin) > > On Tue, Jul 29, 2008 at 9:01 AM, stephe

Re: [R] writing the plots

2008-07-29 Thread John Kane
?png ?write.table --- On Mon, 7/28/08, Rajasekaramya <[EMAIL PROTECTED]> wrote: > From: Rajasekaramya <[EMAIL PROTECTED]> > Subject: [R] writing the plots > To: r-help@r-project.org > Received: Monday, July 28, 2008, 10:54 AM > hi there, > > I want to write the plots in the pdfs and the detail

[R] Howto Draw Bimodal Gamma Curve with User Supplied Parameters

2008-07-29 Thread Gundala Viswanath
Hi, Suppose I have the following vector (data points): > x [1] 36.0 57.3 73.3 92.0 300.4 80.9 19.8 31.4 85.8 44.9 24.6 48.0 [13] 28.0 38.3 85.2 103.6 154.4 128.5 38.3 72.4 122.7 123.1 41.8 21.7 [25] 143.6 120.2 46.6 29.2 44.8 25.0 57.3 96.4 29.4 62.9 66.4 30.0 [37]

[R] About clustering techniques

2008-07-29 Thread pacomet
Hello R users It's some time I am playing with a dataset to do some cluster analysis. The data set consists of 14 columns being geographical coordinates and monthly temperatures in annual files latitutde - longitude - temperature 1 -. - temperature 12 I have some missing values in some cases

Re: [R] Coarsening the Resolution of a Dataset

2008-07-29 Thread Steve Murray
Unfortunately, when I get to the 'myCuts' line, I receive the following error: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? ...and I also receive warnings about memory allocation being reached (even though I've already used memory.limit() to maximise the memo

Re: [R] About clustering techniques

2008-07-29 Thread ctu
Hi Paco, I got the same problem with you before. Thus, I just impute the missing values For example: newdata<-as.matrix(impute(olddata, fun="random")) then I believe that you could analyze your data. Hopefully it helps. Chunhao Quoting pacomet <[EMAIL PROTECTED]>: Hello R users It's some ti

Re: [R] About clustering techniques

2008-07-29 Thread Christian Hennig
Dear Paco, in order to use the methods in the cluster package (including pam), look up the help page of daisy, which is able to compute dissimilarity matrices handling missing values appropriately (in most situations). A good reference is the Kaufman and Rousseeuw book cited on that help page.

Re: [R] combining zoo series with an overlapping index?

2008-07-29 Thread Gabor Grothendieck
The code I gave replaces that portion of d that overlaps with lin with lin. Is that not what you wanted? (please try to use minimal examples as shown here) > library(zoo) > d <- zoo(1:10) + 100 > lin <- - head(d, 4) > window(d, time(lin)) <- coredata(lin) > d 1234567

Re: [R] About clustering techniques

2008-07-29 Thread Christian Hennig
A quick comment on this: imputation is an option to make things technically work, but it is not necessarily good. Imputation always introduces some noise, ie, it fakes information that is not really there. Whether it is good depends strongly on the data, the situation and the imputation metho

[R] Most often pairs of chars across grouping variable

2008-07-29 Thread svga
Hi list, is there a package or function to compute the frequencies of pairs of chars in a variable across a grouping variable? Eg: d <- data.frame(ID=gl(2,3), F=c("A","B","C","A","C","D")) > d ID F 1 1 A 2 1 B 3 1 C 4 2 A 5 2 C 6 2 D Now I want to summarize the frequencies of all pair

Re: [R] Negative Binomial Regression

2008-07-29 Thread Prof Brian Ripley
On Tue, 29 Jul 2008, Ben Bolker wrote: jcarmichael gmail.com> writes: Hello. I am attempting to duplicate a negative binomial regression in R. SAS uses generalized estimating equations for model fitting in the GENMOD procedure. proc genmod data=mydata (where=(gender='F')); by agegroup; c

Re: [R] Most often pairs of chars across grouping variable

2008-07-29 Thread Marc Schwartz
on 07/29/2008 09:51 AM [EMAIL PROTECTED] wrote: Hi list, is there a package or function to compute the frequencies of pairs of chars in a variable across a grouping variable? Eg: d <- data.frame(ID=gl(2,3), F=c("A","B","C","A","C","D")) d ID F 1 1 A 2 1 B 3 1 C 4 2 A 5 2 C 6 2 D Now

Re: [R] Case statements in R

2008-07-29 Thread Roland Rau
Dear all, may I suggest to include this quotation of Patrick Burns in the fortunes package? :-) Best, Roland Patrick Burns wrote: A good reason to use '&&' rather than '&' is if evaluating whatever is on the right will create an error if what is on the left is FALSE. '&&' and '||' stop if

[R] subscript out of bounds error.

2008-07-29 Thread Rajasekaramya
(mean.std.s2n.loss.gain[[1]]) Probe.Set.ID rho_prime r ho_prime_sdpom Expr1 matchinggenes Mean std_dev 29 SNP_A-190846347 2.47 0.75 0 PRKCZ - 0.34560. 1344 30 SNP_A-213137044 2.61

[R] lattice question

2008-07-29 Thread Troels Ring
Dear friends - I have a plot of simulated data to compare to the observed and want the simulated to appear accumulated so that a darker grey corresponds to more lines of simulated data, but on top of that I want the measured values (Na) to be very visible. The code below meets only few of the d

[R] subscript out of bounds help

2008-07-29 Thread Rajasekaramya
(mean.std.s2n.loss.gain[[1]]) Probe.Set.ID rho_prime rho_prime_sd pom Expr1 matchinggenes Meanstd_dev 29 SNP_A-190846347 2.47 0.75 0 PRKCZ -0.345616170.13443676 30 SNP_A-213137044 2.61 0.58 0

[R] Removing script file

2008-07-29 Thread Dennis Fisher
Colleagues, (Running R 2.7.0) I have a script that I want to delete as it completes execution. The penultimate line of the script (before the quit command) is: file.remove("Scriptname") The script is executed as: R --no-save < Scriptname In OS X and Linux this is successful an

[R] tensor product of equi-spaced B-splines in the unit square

2008-07-29 Thread Patrizio Frederic
Dear all, I need to compute tensor product of B-spline defined over equi-spaced break-points. I wrote my own program (it works in a 2-dimensional setting) library(splines) # set the break-points Knots = seq(-1,1,length=10) # number of splines M = (length(Knots)-4)^2 # short cut to splineDe

Re: [R] Negative Binomial Regression

2008-07-29 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prof Brian Ripley wrote: | On Tue, 29 Jul 2008, Ben Bolker wrote: | |> jcarmichael gmail.com> writes: |> |>> |>> |>> Hello. |>> |>> I am attempting to duplicate a negative binomial regression in R. |>> SAS uses |>> generalized estimating equations fo

[R] Bootstraping GAMs for confidence intervales calculation

2008-07-29 Thread Luis Reino
Dear R-Users, I am resending this message just to reminder my question regarding the calculation of a bootstrap confidence intervals for a GAM plot. I am trying to apply a bootstrap to a GAM in order to calculate the 95% confidence intervals for a smooth curve obtained by the “plot.gam” fun

[R] more environment questions

2008-07-29 Thread Edna Bell
Hi R Gurus: Here is some code that I was experimenting with, please: > f1 <- function(x) { + e1 <- new.env(parent=.GlobalEnv) + environment(e1) + print(environment()) + return(mean(x)) + } > f1(1:15) [1] 8 > My question: why isn't the environment within the function set to e1, please? Thanks,

Re: [R] Panel of pie charts

2008-07-29 Thread Richard . Cotton
> I am looking to making a panel of pie charts fo some of my > dritribution data . I was wondering if there is a way in any R > package to write a small script to do so. pie() will do you a one-off pie chart, but there is no equivalent using grid/ lattice graphics. You could write a panel.pie

Re: [R] more environment questions

2008-07-29 Thread Gabor Grothendieck
e1 <- ... creates a new environment e1 environment(e1) does nothing print(environment(e1)) print environment e1 By the way, if you are doing a lot of manipulations of environments you might want to look at the proto package which reframes the whole thing in terms of object oriented programming.

[R] Question regarding statisticians

2008-07-29 Thread Max
Hi Everyone, I'm apologize for asking this in the R-general list, but I'm unsure of where else to ask this burning question of mine: Where do statisticians talk on the internet about professional/ career developement/ issues? I've found many a list (much like this one) that specailize in tal

[R] table questions

2008-07-29 Thread Edna Bell
Hi again! Suppose I have the following: > xy <- round(rexp(20),1) > xy [1] 0.1 3.4 1.6 0.4 1.0 1.4 0.2 0.3 1.6 0.2 0.0 0.1 0.1 1.0 2.0 0.9 2.5 0.1 1.5 0.4 > table(xy) xy 0 0.1 0.2 0.3 0.4 0.9 1 1.4 1.5 1.6 2 2.5 3.4 1 4 2 1 2 1 2 1 1 2 1 1 1 > Is there a way to s

Re: [R] more environment questions

2008-07-29 Thread Edna Bell
Is there a way to set the environment within a function,, please? On Tue, Jul 29, 2008 at 11:25 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > e1 <- ... > creates a new environment e1 > > environment(e1) > does nothing > > print(environment(e1)) > print environment e1 > > By the way, if you

Re: [R] more environment questions

2008-07-29 Thread Gabor Grothendieck
No but look at proto since I suspect the creation of proto objects is basically what you are trying to do through the back door. Home page: http://r-proto.googlecode.com On Tue, Jul 29, 2008 at 12:29 PM, Edna Bell <[EMAIL PROTECTED]> wrote: > Is there a way to set the environment within a functi

[R] ls() and memory question

2008-07-29 Thread Edna Bell
Hi again! I put in ls() to check the objects in my workspace. Is there a limit on how many objects I can have, please? Or does it depend on the memory, please? TIA, Edna Bell __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

[R] Graphics function question

2008-07-29 Thread Peter Flom
Hello I have created a graph using the following commands: <<< startBReP3O1T <- diffs$BReP3O1T - diffs$diff_BReP3O1T endBReP3O1T <- diffs$BReP3O1T x <- seq(47,89, length = 10) ymin <- min(min(startBReP3O1T), min(endBReP3O1T)) ymax <- max(max(startBReP3O1T), max(endBReP3O1T)) y <- seq(ymin, ymax,

Re: [R] combining zoo series with an overlapping index?

2008-07-29 Thread stephen sefick
plot(replace(day, is.list(index(lin)), coredata(lin))) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide

[R] try question

2008-07-29 Thread Edna Bell
Hi still yet again! I have the following code: > try(log(rnorm(25)),silent=TRUE) [1] -0.26396185 NaN NaN -0.13078069 -2.44997193 -2.15603971 NaN 0.94917495 0.07244544 NaN [11] -1.06341127 -0.42293099 -0.53769569 0.95134763 0.93403340 NaN -0.10502078

[R] accessing list elements

2008-07-29 Thread Paul Adams
Hello everyone, I have a list which I am trying to calculate a max value.I have the list as w<-c(v[[1]][1],...v[[100]][1]). The problem I am getting is that the function max is saying the list is an "invalid type (list) of  argument".When I show the element v[[1]][1] it shows as $statistic,V,73

Re: [R] try question

2008-07-29 Thread Richard . Cotton
> > try(log(rnorm(25)),silent=TRUE) > [1] -0.26396185 NaN NaN -0.13078069 -2.44997193 > -2.15603971 NaN 0.94917495 0.07244544 NaN > [11] -1.06341127 -0.42293099 -0.53769569 0.95134763 0.93403340 > NaN -0.10502078 NaN 0.30283262 NaN > [21] -0.1

Re: [R] Removing script file

2008-07-29 Thread Prof Brian Ripley
On Tue, 29 Jul 2008, Dennis Fisher wrote: Colleagues, (Running R 2.7.0) I have a script that I want to delete as it completes execution. The penultimate line of the script (before the quit command) is: file.remove("Scriptname") The script is executed as: R --no-save < Scriptna

Re: [R] Panel of pie charts

2008-07-29 Thread Gavin Simpson
On Tue, 2008-07-29 at 17:23 +0100, [EMAIL PROTECTED] wrote: > > I am looking to making a panel of pie charts fo some of my > > dritribution data . I was wondering if there is a way in any R > > package to write a small script to do so. > pie() will do you a one-off pie chart, but there is no eq

Re: [R] Graphics function question

2008-07-29 Thread Sarah Goslee
You can do it very easily using subsetting and a bit of paste(). I assumed you didn't need startdata and enddata after the plot has been made, but if you do you can change the last line of the function to return them. Sarah myfunction <- function(dataname) { # where dataname is a string, eg myf

Re: [R] accessing list elements

2008-07-29 Thread Sarah Goslee
What's v? And w? And what exactly do you want to do? A small reproducible example would be very helpful. Without knowing what your data look like, it's hard to make helpful suggestions. Sarah On Tue, Jul 29, 2008 at 12:56 PM, Paul Adams <[EMAIL PROTECTED]> wrote: > > Hello everyone, > I have a

Re: [R] Graphics function question

2008-07-29 Thread Marc Schwartz
on 07/29/2008 11:38 AM Peter Flom wrote: Hello I have created a graph using the following commands: <<< startBReP3O1T <- diffs$BReP3O1T - diffs$diff_BReP3O1T endBReP3O1T <- diffs$BReP3O1T x <- seq(47,89, length = 10) ymin <- min(min(startBReP3O1T), min(endBReP3O1T)) ymax <- max(max(startBReP3O

Re: [R] Negative Binomial Regression

2008-07-29 Thread Prof Brian Ripley
On Tue, 29 Jul 2008, Ben Bolker wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prof Brian Ripley wrote: | On Tue, 29 Jul 2008, Ben Bolker wrote: | |> jcarmichael gmail.com> writes: |>> |>> Hello. |>> |>> I am attempting to duplicate a negative binomial regression in R. |>> SAS uses |>> g

Re: [R] try question

2008-07-29 Thread Prof Brian Ripley
On Tue, 29 Jul 2008, Edna Bell wrote: Hi still yet again! I have the following code: try(log(rnorm(25)),silent=TRUE) [1] -0.26396185 NaN NaN -0.13078069 -2.44997193 -2.15603971 NaN 0.94917495 0.07244544 NaN [11] -1.06341127 -0.42293099 -0.53769569 0.9513476

Re: [R] accessing list elements

2008-07-29 Thread Erik Iverson
Hello - Paul Adams wrote: Hello everyone, I have a list which I am trying to calculate a max value.I have the list as w<-c(v[[1]][1],...v[[100]][1]). The problem I am getting is that the function max is saying the list is an "invalid type (list) of argument".When I show the element v[[1]][1] it

Re: [R] Negative Binomial Regression

2008-07-29 Thread Ben Bolker
Prof Brian Ripley wrote: 'poisson' _family_, I presume? oops, yes. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commente

Re: [R] Major Cloud Computing Testbed Announced at University of Illinois

2008-07-29 Thread Ajay ohri
*R we Wishing on a cloud-* I would like to Test R as an cloud analytical tool. remote submit csv files to the web for data mining , get data crunching with scalable processing power and disk storage , display Silverlight graphs of summarization, downloadable in pdf's. data mining on demand, o

Re: [R] Graphics function question

2008-07-29 Thread Sarah Goslee
One clarification: I did the dirty and completely unprofessional thing, and assumed that this function would only be run in the workspace with all your data. I use functions like this frequently for something I need to do multiple times for a particular project, but will never do anywhere else, bu

[R] List names help

2008-07-29 Thread Rajasekaramya
hi , Is there anyways to delet the list names once created. i tried rm(names(mylist)) i didnt work kindly help me Ramya -- View this message in context: http://www.nabble.com/List-names-help-tp18717742p18717742.html Sent from the R help mailing list archive at Nabble.com. _

[R] biplot_group_colours_and_point_symbols

2008-07-29 Thread Indermaur Lukas
hi, i am seeking for a solution to create a biplot that shows: a) data points instead of labels and that b) shows two different groups (field: site with two factor levels: forest/corridor) in different colours i tried to include "pch=19" to show points instead of labels in the syntax below but

[R] Flexible semivariogram in R (HELP)

2008-07-29 Thread Alessandro
Hey All, I am a PhD student in Forestry science and I wish use kriging to spatial LiDAR cloud points. The shape of my semivariogram is like "hole (wave) model", but unfortunately I don't know the code of flexible model or hole model to fit my semivariogram in R. I Found it in google or in R he

Re: [R] List names help

2008-07-29 Thread Sarah Goslee
Sure, just set them to NULL. > mylist <- c(a=1, b=2, c=3) > mylist a b c 1 2 3 > names(mylist) <- NULL > mylist [1] 1 2 3 Sarah On Tue, Jul 29, 2008 at 1:45 PM, Rajasekaramya <[EMAIL PROTECTED]> wrote: > > hi , > > Is there anyways to delet the list names once created. > > i tried > rm(names(my

Re: [R] table questions

2008-07-29 Thread Patrizio Frederic
# is that what you want? table(cut(xy,seq(0,max(xy)+.4,by=.4))) # or this table(cut(xy,hist(xy)$breaks)) # not the same regards, PF +- | Patrizio Frederic | Research associate in Statistics, | Department of Economics, | University of Modena and

Re: [R] Graphics function question

2008-07-29 Thread Marc Schwartz
Just a quick follow up to my own post here. In offline exchanges, Peter noted a typo in the call to plot(), where I was missing the final ")". Also, I had the order of the unnamed arguments to segments() off. Here is the corrected code, with some additional teaks: plotdiffs <- function(x, y,

Re: [R] combining zoo series with an overlapping index?

2008-07-29 Thread stephen sefick
My apologies it worked perfectly. On Tue, Jul 29, 2008 at 12:40 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > plot(replace(day, is.list(index(lin)), coredata(lin))) > -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for u

Re: [R] ls() and memory question

2008-07-29 Thread jim holtman
It is memory. You should probably not have 40% of your RAM allocated to R so that if you do create some large objects, you will have room for them. How much physical memory do you have, can you put some "numbers" on how many objects you need, if you have a lot of them, have you considered using l

[R] R command history -- can it be like Matlab's?

2008-07-29 Thread losemind
Hi all, In R GUI window, if you use "up" and "down" key, you will be able to recall the previous and next command that has been used and stored in the command history cache. But there is one inconvenience: In Matlab, you can type the first a few characters of the command that you previously use

Re: [R] Coarsening the Resolution of a Dataset

2008-07-29 Thread jim holtman
I assume that you are doing this on one column of the matrix which should only have 2160 entries in it. can you send the actual code you are using. I tried it with 10,000 samples and it works fine. So I need to understand the data structure you are using. Also the infinite recursion sounds stra

Re: [R] R command history -- can it be like Matlab's?

2008-07-29 Thread Prof Brian Ripley
A patch to do this was posted on 2007-09-29 by Glenn Davis. Some people not addicted to Matlab find the behaviour very inconvenient and prefer the getline/readline behaviour (triggered by ^R/^S) of Rterm and R on Unixen. On Tue, 29 Jul 2008, losemind wrote: Hi all, In R GUI window, if you

Re: [R] try question

2008-07-29 Thread Mike Prager
"Edna Bell" <[EMAIL PROTECTED]> wrote: > Hi still yet again! > > I have the following code: > > > try(log(rnorm(25)),silent=TRUE) > [1] -0.26396185 NaN NaN -0.13078069 -2.44997193 > -2.15603971 NaN 0.94917495 0.07244544 NaN > [11] -1.06341127 -0.42293099 -0.537

[R] optimize simultaneously two binomials inequalities using nlm

2008-07-29 Thread emir.toktar
Dear R users, I´m trying to optimize simultaneously two binomials inequalities used to acceptance sampling, which are nonlinear solution, so there is no simple direct solution. Please, let me explain shortly the the problem and the question as following. The objective is to obtain the smallest v

[R] finding a faster way to do an iterative computation

2008-07-29 Thread dxc13
useR's, I am trying trying to find out if there is a faster way to do a certain computation. I have successfully used FOR loops and the apply function to do this, but it can take some time to fully compute, but I was wondering if anyone may know of a different function or way to do this: > x [1]

Re: [R] finding a faster way to do an iterative computation

2008-07-29 Thread Christos Hatzis
matrix(rep(x, each=13) - xk, nrow=13) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of dxc13 > Sent: Tuesday, July 29, 2008 2:13 PM > To: r-help@r-project.org > Subject: [R] finding a faster way to do an iterative computation > > > useR's, > > I

Re: [R] finding a faster way to do an iterative computation

2008-07-29 Thread Rolf Turner
On 30/07/2008, at 6:12 AM, dxc13 wrote: useR's, I am trying trying to find out if there is a faster way to do a certain computation. I have successfully used FOR loops and the apply function to do this, but it can take some time to fully compute, but I was wondering if anyone may know

Re: [R] R command history -- can it be like Matlab's?

2008-07-29 Thread hadley wickham
On Tue, Jul 29, 2008 at 2:45 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > A patch to do this was posted on 2007-09-29 by Glenn Davis. Some people not > addicted to Matlab find the behaviour very inconvenient and prefer the > getline/readline behaviour (triggered by ^R/^S) of Rterm and R on U

Re: [R] R command history -- can it be like Matlab's?

2008-07-29 Thread Rolf Turner
On 30/07/2008, at 9:16 AM, hadley wickham wrote: On Tue, Jul 29, 2008 at 2:45 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: A patch to do this was posted on 2007-09-29 by Glenn Davis. Some people not addicted to Matlab find the behaviour very inconvenient and prefer the getline/readline

Re: [R] R command history -- can it be like Matlab's?

2008-07-29 Thread hadley wickham
On Tue, Jul 29, 2008 at 4:39 PM, Rolf Turner <[EMAIL PROTECTED]> wrote: > > On 30/07/2008, at 9:16 AM, hadley wickham wrote: > >> On Tue, Jul 29, 2008 at 2:45 PM, Prof Brian Ripley >> <[EMAIL PROTECTED]> wrote: >>> >>> A patch to do this was posted on 2007-09-29 by Glenn Davis. Some people >>> not

[R] placing a text in the corner of a plot

2008-07-29 Thread Jörg Groß
Is there an easy way to add a text into an R-plot and place it in the upper left corner? Like that: | (a) | | | | | |

Re: [R] placing a text in the corner of a plot

2008-07-29 Thread Jorge Ivan Velez
Dear Jörg, Perhaps, plot(1:10) legend("topleft",c("Your text here"),pch=1) See ?legend and ?text for more information. HTH, Jorge On Tue, Jul 29, 2008 at 6:04 PM, Jörg Groß <[EMAIL PROTECTED]> wrote: > Is there an easy way to add a text into an R-plot and place it in the upper > left corner

  1   2   >